Re: File Handing Windows / Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 ]
*/

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux