问答详情
源自:3-13 PHP第一种特殊类型—资源

结果显示有问题

没有输出

Warning: fopen(): Unable to access /resourse/php/f.txt in /754/5qko/index.php on line 3

Warning: fopen(/resourse/php/f.txt): failed to open stream: No such file or directory in /754/5qko/index.php on line 3

Warning: fclose() expects parameter 1 to be resource, boolean given in /754/5qko/index.php on line 12

提问者:奥特曼想打小怪兽 2015-07-06 13:19

个回答

  • Perona
    2015-07-06 13:38:01

    $file_handle=fopen("/data/webroot/resourse/php/f.txt","r");

    是resource,不是resourse。文件名写错了,当然就找不到

    $file_handle=fopen("/data/webroot/resource/php/f.txt","r");