Is there anyway I can set up my own timeout parameter when calling the file_get_contents method ?
| SitePoint Sponsor |




Is there anyway I can set up my own timeout parameter when calling the file_get_contents method ?
PHP Code:function abc($filename, $time = 3600) {
set_time_limit($time);
return file_get_contents($filename);
}
abc("a.txt");
My website: http://www.openphp.cn




Mmmm, i thought set_time_limit was to define the script execution time.
Can you use it to set a function execution time ? Also, I use set_time_limit to define how long my overall script can run, doesn't using it in a function overwrite the value i set for my script ?
more or less my question is whether set_time_limit affects a value with a scope of the script or with the scope of the block it runs in.
Thanks anyway for your input.
Bookmarks