dr_dedo, thanks.
"but, having your include files scattered this way, means that there is a problem with design, and that problem sooner or later will boom your site. do you r best to gather all your include files in one place"
Nevertheless, this is the case. The question was is there a more general way to write the code so one doesn't need to do ../../ etc?
Main Topics
Browse All Topics





by: dr_dedoPosted on 2008-02-10 at 18:04:52ID: 20863579
you could have a file with list of all files you wish to include and include that file in all other files. /file.php" ); /file5.php ");
you can use files' absolute path.
e.g.
file include.php
<?php
require_once ("home/usr/etc/xxx/sss/zzz
require_once ("home/usr/etc/xxx/ddd/aaa
?>
in any page include file include.php
but, having your include files scattered this way, means that there is a problem with design, and that problem sooner or later will boom your site. do you r best to gather all your include files in one place