Re: file_exists() question
| From: | Jim Lucas | Date: | Sat, 08 Mar 2003 21:36:54 +0000 |
| Subject: | Re: file_exists() question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-138783@lists.php.net to get a copy of this message | ||
what does $annrow[id] return?
I HAVE found that I have to refer to a file when using file_exists() from /
so
file_exists("/path/to/me/cherpdocs/filename.doc")
for it to work right.
Jim
----- Original Message -----
From: "Charles Kline" <ckline@rightcode.net>
To: <php-general@lists.php.net>
Sent: Saturday, March 08, 2003 1:10 PM
Subject: [PHP] file_exists() question
> Can anyone tell me why this code does not return true when the file in
> the directory cherpdocs/ with the file (which I see as being there)
> does exist?
>
> if(file_exists('cherpdocs/$annrow[id].doc')){
> echo "<br /><a href=\"cherpdocs/$annrow[id].doc\">Funding
> details paper</a>";
> }
>
> This is a path relative to the file calling it, should it be otherwise?
>
> Thanks
> Charles
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>