Re: File Handing Windows / Linux

From: Date: Wed, 17 Nov 2004 16:39:06 +0000
Subject: Re: File Handing Windows / Linux
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-202318@lists.php.net to get a copy of this message
Steve Vernon wrote:
Hiya! 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']."/"); @ $handle = opendir("/home/mywebsite/public_html/extra/photos/".$_GET['page']."/"); Had a search on google, but not really sure what to look for!
why not ry relative path? $handle = opendir("./extra/photos/".$_GET['page']."/"); -- Sebastian Mendel www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com www.sf.net/projects/phpdatetime www.sf.net/projects/phptimesheet

« previous php.general (#202318) next »