Author Topic: calling categories.php from a sub directory (server side includes)  (Read 2955 times)

0 Members and 1 Guest are viewing this topic.

Offline matimer

  • Pre-Newbie
  • Posts: 7
    • View Profile
I hope being specific enough....

I've got a server side include in my home directory....
  /home - This file calls my categories.php file (http://www.site.com/folder/categories.php?cat_id=10)

The problem is b/c the server side include is in the /home directory it's leaving out the "folder" in all the links and the login and search aren't working...

Is there an easy way to hard code this in for everything?

THANKs for all your guys help,

Matt

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Re: calling categories.php from a sub directory (server side includes)
« Reply #1 on: April 23, 2005, 02:03:42 AM »
Code: [Select]
include_once($_SERVER['DOCUMENT_ROOT']."/folder/categories.php");
www.php.net