Jochem Maas wrote:
please keep posts on list.
jekillen wrote:
On Jun 17, 2007, at 12:18 PM, Jochem Maas wrote:
jekillen wrote:
Hello again;
does the following test pass if the file is successfully included:
if( include( some file ) )
or does it pass with:
if( ! include( some file ) )
have you tried it?
Well, typically while waiting for a reply, which I thank you for,
I did browse through My Oreilly text Programming php
which did not have anything definitive, and looking at
the manual which did not have anything completely
satisfying, I did try it as if( include( some file ) ) and
it worked. But I also testing a file that I knew would
cause an error, sure enough the else conditional
did smear error messages all over the browser window.
I have no idea what else condition you mean and I also have no idea
what these 'error messages' are or what they have to do with the
original question (which I had assumed was about the testing return
values from an include statement ... something you could have gleaned
from the manual and a couple of tests.
So I did:
if(file_exists( some file ))
{
include(some file);
}
Thanks again
JK
Im not exactly sure either about what you mean but you could give it a
try using try {} catch {}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php