今天在写一个程序的时候,需要在shell下面执行一个文件,那个文件里面包含了空格,所以转义了一下。接着用fopen打开这个文件的时候,报错了:

failed to open stream: No such file or directory in /data/www/axel.php on line 101
后来删除了转义的文件路径,直接使用fopen打开,结果就没问题。所以如果该路径里面包含空格或者特殊符号,记住在fopen下不需要转义。
  在fopen函数底层做了转义处理。如果转义后使用fopen那么久会 报错。

Leave a Reply

电子邮件地址不会被公开。 必填项已用*标注

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="">

请选择吧!