开发者

PHP readfile adds content length to output

开发者 https://www.devze.com 2022-12-28 07:31 出处:网络
I am using the PHP readfile function to read a file and print it like so: print readfile (\'anyfile\'). This works, but the content length of the file is added at the end of the string also. Wh开发者_

I am using the PHP readfile function to read a file and print it like so: print readfile ('anyfile'). This works, but the content length of the file is added at the end of the string also. Wh开发者_如何转开发y?


readfile() prints out the contents itself and returns the content length -- you're effectively printing the contents with readfile and then printing the content length with print. Remove print and just use

readfile('anyfile');
0

精彩评论

暂无评论...
验证码 换一张
取 消