August 22nd, 2000, 02:24 PM
-
I'm trying to use include files with PHP3 in a regular document. It works fine with any include files within the the directory where the main document lives, but when I look for files outside the directory, it cant find them. Same thing happens with "require()"
Sample that works:
<?php
require("stuff.inc");
?>
Sample that doesn't:
<?php
require("/includes/stuff.inc");
?>
Thanks.
August 22nd, 2000, 02:44 PM
-
you need to put the FULL path to files outside the directory the script is in, much the same you need the full path to images in different directories when using the <IMG SRC> tag in html. Try
require("/path/to/stuff.php");
include("/path/to/stuff.php");
------------------
<UL TYPE=SQUARE>
<LI> TD Scripts
<LI> Script School
<LI>php-scripts
</UL>
August 22nd, 2000, 02:55 PM
-
That's what I tried, but it isn't working. In fact, I tried to really follow the direct path by using the http://www.blashblah.com/includes/stuff.php and it still doesn't work. D'oh! Thanks!
[This message has been edited by BicyclePunk (edited August 22, 2000).]
August 22nd, 2000, 02:57 PM
-
No, the full SERVER path, not the url path 
require("/home/user/www/files/stuff.php");
August 22nd, 2000, 03:12 PM
-
That's it! Thanks!! 