Re: File Handing Windows / Linux
| From: | Jason Wong | Date: | Sun, 14 Nov 2004 17:26:35 +0000 |
| Subject: | Re: File Handing Windows / Linux | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-201983@lists.php.net to get a copy of this message | ||
On Monday 15 November 2004 00:34, Steve Vernon wrote:
> I am trying to make some code which gets a handle to a directory, but has
> different code for my localhost (Windows) and for online (Linux server).
>
> Basically, I want either of the below lines. Say if the first fails, it
> must be on Linux and then it uses the line below.
>
> The two example lines are:
>
> @ $handle =
> opendir("c:/websites/mywebsite/extra/photos/".$_GET['page']."/");
opendir() returns FALSE if directory cannot be opened for any reason. You can
also use file_exists(), is_dir().
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Hodie natus est radici frater.
[ Unto the root is born a brother ]
*/