Page 1 of 1

opendir(), easy question.

Posted: Mon May 22, 2006 5:15 am
by thinICE
Hi,
can I set path of opendir to be an url?
As an instance opendir("http://www.mydomain.com/mydir");
Currently i'm using a relative path, but this creates me some problems, opendir("../../mydir");

Thanks.

Re: opendir(), easy question.

Posted: Mon May 22, 2006 5:49 am
by xpgeek
thinICE wrote:Hi,
can I set path of opendir to be an url?
As an instance opendir("http://www.mydomain.com/mydir");
Currently i'm using a relative path, but this creates me some problems, opendir("../../mydir");

Thanks.
sorry for english

check - directory '../../mydir' exists

Code: Select all

if (file_exists('../../mydir'))
{
opendir("../../mydir")
}
you couldn't open url some as http://, but you can open ftp:// direcotry in php version >= 5.0.0.