On Tue, 17 Jun 2003 19:25:39 +0200, you wrote: >I have the following code: >if (file_exists("themes/$ThemeSel/modules/$name/$mod_file.php")) { $modpath >= "themes/$ThemeSel/"; } > >At home on my PC (WinXP+PHP4.3.2) this code works without warnings. >But in my office (Win2000+PHP4.3.0) I always becom warnings for this line >and in case of any other file_exists call. >(Both case the file doesn't exist) > >How can I disable display warning in such case?
Change your error reporting level http://www.php.net/manual/en/function.error-reporting.php (or set globally in php.ini) or supress the error with @ (can't find a URL, but essentially place @ in front of a statement to supress errors). However... that's just supressing the warning, not fixing it. It's odd that PHP would throw a warning if the file doesn't exist. What warning are you getting, exactly? What happens if you have a script that just contains <? if (file_exists('test.txt')) { echo("one"); } else { echo("two"); } ?> Hmm... could this be your bug? http://bugs.php.net/bug.php?id=15932 Maybe an upgrade would fix it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php