Using assigned IDs

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

User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

or use the constant DIRECTORY_SEPERATOR, which is cross platform :)
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Dude, that is a good idea.
phpflixnewbie
Forum Contributor
Posts: 132
Joined: Fri Nov 17, 2006 11:46 am

Post by phpflixnewbie »

Jcart wrote:or use the constant DIRECTORY_SEPERATOR, which is cross platform :)
Just thought id let you know, I did actually try \coverart_images\ before changing the backslashes to forward slashes but that didnt work either.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

URL's only use forward slashes. Is coverart_images a folder in the root of your website? The somewhat simple way to figure that out is to check if $_SERVER['DOCUMENT_ROOT'] is the parent structure for it.
phpflixnewbie
Forum Contributor
Posts: 132
Joined: Fri Nov 17, 2006 11:46 am

Post by phpflixnewbie »

Im pretty sure the folder is in the root folder of the website because at the moment im testing everything locally using Xamp. The coverarts folder is in the htdocs directory along with all the website pages. How would i check for $_SERVER['DOCUMENT_ROOT']?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

var_dump() comes to mind.
phpflixnewbie
Forum Contributor
Posts: 132
Joined: Fri Nov 17, 2006 11:46 am

Post by phpflixnewbie »

using var_dump ($_SERVER) the doc root seems correct. Anyway, the forward slashes solved the problem, so this isnt really an issue anymore, thx for the tips though.
Post Reply