haya,
i have a little problem i cant seem to find a way to fix
its pretty simple (i have php 5.1.4 on apache 2.2.2)
apache conf file DocumentRoot "D:/www/"
i used include("/con.php"); in smth.php which is in D:/www/smth/
and the server return error that it cant find the file
the server is looking for con.php in D:/ not in D:/www/
and / should bring you in the DocumentRoot not in D:/
how can i fix this ?
path porblems
Moderator: General Moderators
he location of . for include/require is determined by the include_path setting...
Changing the include_path (programatically) i usually do as following:
Code: Select all
echo ini_get('include_path');Code: Select all
<?php
ini_set(‘error_reporting’, E_ALL);
ini_set(‘display_errors’, TRUE);
$include_paths = array(
‘.’,
‘/home/users/timvw/phpincs’,
‘/home/users/timvw/pear’,
ini_get(‘include_path’)
);
ini_set(‘include_path’, implode(PATH_SEPARATOR, $include_paths));
?>