Unable to open path

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
User avatar
$var
Forum Contributor
Posts: 317
Joined: Thu Aug 18, 2005 8:30 pm
Location: Toronto

Unable to open path

Post by $var »

Code: Select all

$path = "http://www.londonindie.com/imi/band/".$ID"; 
$dir_handle = @opendir($path) or die("Unable to open $path");
i get the or die.
this very simple set of commands does not appear to be working on my system.
it echos the proper ID, and the directory exists, and has the correct permissions.
when i copy and paste the parsed path, it's fine going there in a browser.

i have tried using [DOCUMENT_ROOT] too... and it has a different error all together. Resource unavailable.

any ideas?
User avatar
waradmin
Forum Contributor
Posts: 240
Joined: Fri Nov 04, 2005 2:57 pm

Post by waradmin »

Your code is wrong there are too many quotes you need to close the second pair.

You have

Code: Select all

$path = "http://www.londonindie.com/imi/band/".$ID";
It needs to be

Code: Select all

$path = "http://www.londonindie.com/imi/band/". $ID ."";
or

Code: Select all

$path = "http://www.londonindie.com/imi/band/".$ID.;
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

waradmin's last option has a parse error.
User avatar
waradmin
Forum Contributor
Posts: 240
Joined: Fri Nov 04, 2005 2:57 pm

Post by waradmin »

waradmin's last option has a parse error.
Sorry bout that I just typed up two I thought may work, I didnt have time to test them.
Post Reply