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