RE: [PHP] Re: How to tell if the filepath exist or not before attempting to create a directory??

2004-12-02 Thread Ford, Mike
To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm



On 02 December 2004 18:51, Richard Lynch wrote:

> Marek Kilimajer wrote:
> > 
> > What version? On 5.0.2 file_exists('nonexistingfile'); does not
> > generate any error message.
> 
> Ya got me.
> 
> In 4.3.9 it doesn't do that any more either.
> 
> I'm getting old.
> 
> It would be nice to document when it changed if anybody *does* know.

The PHP 4 ChangeLog (http://www.php.net/ChangeLog-4.php) has this for
version 4.3.2:

  Fixed bug #21531 (file_exists() and other filestat functions report
  errors when the requested file/directory does not exists). (Sara) 

and this for version 4.3.3:

  Fixed bug #24313 (file_exists() warning on non-existent files when
  open_basedir is used). (Ilia)

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: How to tell if the filepath exist or not before attempting to create a directory??

2004-12-02 Thread Richard Lynch
Marek Kilimajer wrote:
> Richard Lynch wrote:
>> Scott Fletcher wrote:
>>
>>>Never mind that..  I found a different way to use it.  It would be so
>>> cool
>>>if there is such a feature as directory_exists() to check for partical
>>>filepath...
>>
>>
>> http://php.net/file_exists
>>
>> You'll need to use @ in front, because it generates an error message
>> when
>> it doesn't find the file you're not sure exists. :-(
>
> What version? On 5.0.2 file_exists('nonexistingfile'); does not generate
> any error message.

Ya got me.

In 4.3.9 it doesn't do that any more either.

I'm getting old.

It would be nice to document when it changed if anybody *does* know.

-- 
Like Music?

http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: How to tell if the filepath exist or not before attempting to create a directory??

2004-12-02 Thread Marek Kilimajer
Richard Lynch wrote:
Scott Fletcher wrote:
Never mind that..  I found a different way to use it.  It would be so cool
if there is such a feature as directory_exists() to check for partical
filepath...

http://php.net/file_exists
You'll need to use @ in front, because it generates an error message when
it doesn't find the file you're not sure exists. :-(
What version? On 5.0.2 file_exists('nonexistingfile'); does not generate 
any error message.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: How to tell if the filepath exist or not before attempting to create a directory??

2004-12-01 Thread John Nichel
Richard Lynch wrote:
Be kinda like isset() issuing a NOTICE for a variable that's not set. 
Well, duh.  That's why I asked. :-)
isset() doesn't issue a notice...at least not in php 4.3.9.  It just 
returns true or false.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: How to tell if the filepath exist or not before attempting to create a directory??

2004-12-01 Thread Richard Lynch
Scott Fletcher wrote:
> Never mind that..  I found a different way to use it.  It would be so cool
> if there is such a feature as directory_exists() to check for partical
> filepath...

http://php.net/file_exists

You'll need to use @ in front, because it generates an error message when
it doesn't find the file you're not sure exists. :-(

I've always thought that was a pretty stupid error message myself...

Be kinda like isset() issuing a NOTICE for a variable that's not set. 
Well, duh.  That's why I asked. :-)

Oh, and I'm pretty sure file_exists works just fine for directories. 
Maybe even on Windoze. :-^

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: How to tell if the filepath exist or not before attempting to create a directory??

2004-12-01 Thread Scott Fletcher
Never mind that..  I found a different way to use it.  It would be so cool
if there is such a feature as directory_exists() to check for partical
filepath...

Scott

"Scott Fletcher" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm wondering how to tell if the filepath exist or not, that way, I don't
> create the directory if the filepath exist.
>
> I thought that the is_dir() is the way to go but found that it is not
> reliable.
>
> Thanks,
>  Scott

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php