fgetcsv返回的不是确切的值

时间:2017-07-18 11:20:45

标签: php csv

我正在尝试阅读此值"<! PC:IDJLOGIN; >",但我得到了这个值IDJLOGIN 这个代码,(它是php doc的代码),我试过用utf-8和ANSI编纂

$row = 1;
    if (($handle = fopen($url, "r")) !== FALSE) {
        while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
            $num = count($data);
            echo "<p> $num fields in line $row: <br /></p>\n";
            $row++;
            for ($c=0; $c < $num; $c++) {
                echo $data[$c] . "<br />\n";
            }
        }
        fclose($handle);
    }

0 个答案:

没有答案