PHP readfile adds content length to output

I use PHP reading function to read a file and print it: print readfile ('anyfile'). This works, but the length of the file content is also appended to the end of the line. Why?

+5
source share
1 answer

readfile()prints the content and returns the length of the content - you efficiently print the content with readfile, and then print the length of the content with print. Remove the print and just use

readfile('anyfile');
+16
source

All Articles