Click to See Complete Forum and Search --> : php include problem......why......


Anon
01-04-2001, 01:53 AM
why always show "file not found on include path ("/home/http/......")
So i have to add every page include path in my php.ini file where php file have include code
Ex:
==in my sub dir test/test.php test/config.php

==test.php====
<?
include ("config.php");
.....
....
..
?>

when browse test.php
it will show file not found include path.... error message

how should i do ?
php.ini need modify ??
tks

Anon
01-04-2001, 02:10 AM
If you do this your php page has to be in the same directory as the include page...
<?

include("mypage.inc");

?>


other wise you have to do....

<?

include("path-to-file/mypage.inc");

?>

Anon
01-04-2001, 06:27 AM
You can change the include path (If your using apache/linux/php4) using .htaccess :-

Create a file called .htaccess in the web root directory and in it put :-

php_value include_path .:/path/you/want

Regards
Darren
http://www.php4hosting.com/ $
http://www.php4hosting.co.uk/ £

smarlowe
01-04-2001, 12:28 PM
Make sure your include path includes ./ i.e. the local directory, then you can just include files in the same directory easily.