RE: [PHP] if test
I am not sure what you are trying to accomplish, but maybe require( some file ) will be of more use to you. -Original Message- From: Kostas Papadimitriou [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 19, 2007 9:31 AM To: php-general@lists.php.net Subject: Re: [PHP] if test 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] if test
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
Re: [PHP] if test
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 > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] if test
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? Or, better yet, looked in the manual? http://php.net/include -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] if test
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? > > Thanks > JK > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] if test
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 ) ) Thanks JK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php