Relative path in template, need clarification...

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
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Relative path in template, need clarification...

Post by JAB Creations »

I have a template system I've been working on and I've hit some sort of weird issue.

Here are my paths...

/public_html/templatefiles/
/public_html/gallery/matrix/

The template files load 4 chunks of the page (two parts head, two parts body), along with the content (which is stored in "templatefiles" directory.

I'm working with a content file in the template directory on a gallery page (template is tpl extension and PHP executes fine both locally/live servers). I have a PHP includes inside of the tpl file in the template directory which is the page is requested with an image query (example.php?image=0005) it will load the fifth image instead of the first image of the gallery (allowing direct image URLs to help end hotlinking attempts). The problem is that Firefox keeps timing out and I'm not PHP-smart-enough to know why. :roll:

Suggestions?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I'm not sure your problems (relative path versus Firefox timeout) have anything to do with one another.

I would suggest placing your various paths into the include path. set_include_path(), get_include_path().
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Post by JAB Creations »

I resolved this issue which was directly related to a badly executed PHP script which I wrote.
Post Reply