opendir(), easy question.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
thinICE
Forum Newbie
Posts: 4
Joined: Mon May 08, 2006 11:32 am

opendir(), easy question.

Post 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.
User avatar
xpgeek
Forum Contributor
Posts: 146
Joined: Mon May 22, 2006 1:45 am
Location: Kyiv, Ukraine
Contact:

Re: opendir(), easy question.

Post 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.
Post Reply