Problems with phpstudy environment php7 (str_getcsv function)
iMpérfecτ
iMpérfecτ 2018-03-05 16:38:13
0
2
911
In the environment of
$a1='"上旬","中旬","下旬"';//这种写法输出错误
//$a2='上旬,中旬,下旬';这种写法输出是正确的
print_r(str_getcsv($a1));
-----------结果如下---------------
Array
(
    [0] => 上旬",中旬"
    [1] => 下旬"
)

--------------正确应该如下-------------
Array
(
    [0] => 上旬
    [1] => 中旬
    [2] => 下旬"
)

php7 (all UTF-8 encoding), what is the problem? Does this writing method of $a1 have this problem when running in other integrated environments or Linux PHP environment?

There is an article with a similar problem saying this http://blog.csdn.net/chunyuan314/article/details/61938901 (transcoding does not work)

iMpérfecτ
iMpérfecτ

reply all(2)
iMpérfecτ

This should be a problem with the php version of phpstudy (has any changes been made), wampserver does not have this problem

iMpérfecτ

There are no quotation marks in the last part of the array, which is a typo

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template