Results 1 to 1 of 1
Thread: Simple include_path? How?
Feb 5, 2001, 15:30 #1
- Join Date
- Jan 2001
- Near a computer
- 0 Post(s)
- 0 Thread(s)
First of, i am a newbie so don't slap me too hard. I'm reading about PHP and trying to figure things out by running PHP-scripts(written by others) locally (on win98/PWS/PHP4/MySql).
In theory i get the picture, but when it comes to running a script i get stupid. I know that a config.php is important and i thought i knew how to set paths, but i don't
Here's how i set up a config.php (sips is a newsscript)
$config["httpbase"] = "http://oemcomputer";
$config["sipsbase"] = "/sips/htdocs";
// where sips will store code and data
// (eg "/home/httpd/mysitedata") (no trailing slash!):
$config["sipssys"] = "../sipssys";
I think that "../sipssys" is a bad setting but it gives me index.php in my browser.
Index.php is in the same directory as config.php and has:
include $config["sipssys"] ."/code/stories.inc.php";
include $config["sipssys"] ."/code/box.inc.php";
In a directory lower the file become.php says
But here everything goes wrong i get:
Warning: Failed opening '../sipssys/code/site.inc.php' for inclusion (include_path='') in ../.sipsconfig.php on line 83
Fatal error: Call to undefined function: printtop() in C:\Inetpub\wwwroot/sips/htdocs/admin/become.php on line 23
When i put become.php at the same directory-level as .sipsconfig.php and include ".sipsconfig.php"; i get to see become.php in my browser.
Q1: Where do i go wrong?
Q2: Must i configure include_path in my php.ini?
Next time i will be shorter.