例如我要读一个文件
readfile("http://localhost/$r1/$r2.txt");
而其中的变量是r2,r1在有空格的时候,就会读不了,应该用什么函数?
---------------------------------------------------------------
urlencode
readfile("http://localhost/".urlencode($r1)."/".urlencode($r2).".txt");
例如我要读一个文件
readfile("http://localhost/$r1/$r2.txt");
而其中的变量是r2,r1在有空格的时候,就会读不了,应该用什么函数?
---------------------------------------------------------------
urlencode
readfile("http://localhost/".urlencode($r1)."/".urlencode($r2).".txt");