file() VS file_get_contents() which is better? PHP -


i want know how improve speed of web application creating.

i open other suggestions.

fread or file_get_contents??

they're unrelated, actually.

file() reads file array parsing eol characters, while file_get_contents() reads file contents string.

also, means @ mercy of server operating system, since windows eol different linux eol (for example).

so, first 1 text-friendly, while second 1 binary-friendly.

in short, don't try doing file('image.png');


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -