Archive for September, 2007

September 16th 2007

PHP’s docs.

At the time of writing, a google search for:

Warning: file_get_contents() expects parameter 2 to be boolean, resource given

..doesn’t get any hits.

I encountered this problem following the docs.

Does this imply nobody reads the docs? Do they just steal^Wborrow code from other people? Is everyone using a framework that wraps this for them (haha)?

Hint: It’s a docs problem, the correct prototype is:

string file_get_contents(string filename [, bool use_include_path [, resource context [, long offset [, long maxlen]]]])

Thanks to the lovely people in ##php on freenode. :)

No Comments yet »