• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.