Welcome Guest, Not a member yet? Register   Sign In
serving purchased files
#11

[eluser]brianw1975[/eluser]
From my understanding file_get_contents() is designed for strings and will allocate memory appropriate for a string the size of the file while readfile() is designed for binary files.

http://us.php.net/manual/en/function.readfile.php

http://us.php.net/function.file-get-contents
#12

[eluser]infinivert[/eluser]
Ahhh, Got it. That makes sense.

file_get_contents() did work for an mp3 during my tests, but I'm sure readfile will be more efficient.

Thanks!




Theme © iAndrew 2016 - Forum software by © MyBB