我有一个用于打开和读取csv文件的代码,它是fopen()方法。 但它显示错误。下面是代码
<?php
$file = fopen('C:\Users\Abby\Desktop\testbad\testbed_information.csv', `r`);
?>
错误是
Warning: fopen(C:\Users\Abby\Desktop\testbad\testbed_information.csv): failed to open stream: No error in C:\wamp64\www\date.php on line 2
请帮帮我...... !!
答案 0 :(得分:1)
您的报价有问题。你在第二个参数中使用了后引号。用双引号或单引号改变它
<?php
$file = fopen('C:\Users\Abby\Desktop\testbad\testbed_information.csv', "r");
?>