Forum Moderators: coopster
now if using the include under this new form and of course combining all files at the same level it does fine
<?
include ("include_fns.php");
?>
this include is at the top of the index page and contains a bunch of important DB functions
the index and other pages are in a separated directory
so I need to exit the directory in order to reach that include
which is one level up with the rest of my PHP code
it is important for me to make it working from a directory that does not contain the fns.php for it allows utilising only one set of major PHP files to manage many sub sites
any worng doing in my ../?
thank you
regards
henry
the '../' should do the job with include. maybe php-safemode is activated and will prevent your script using it this way, but it's only an assumption and maybe a wrong one.
what i know for shure is, that i used include that way you want to do it and it worked fine.
to get the causing error out of your script, please check which include path [de3.php.net] your script is using - is the include file located relativly (../) to any of this pathes?
then ensure that the script which includes the db-module isn't itself included and php will search at a wrong place for the include. to check out the script path, use the phpinfo() [php.net] function or the according php variable (server-specific / depending on cgi/api it's using maybe)
hope this helps and maybe you can post some more details if my posting does not help.
-hakre
I think it's worth a try. On my site, the include files I use wouldn't show up until I left out the braces. I've tried '../' without the braces on my site and it worked. I also tried writing out the full path to the file I wanted to include WITH braces and that works -- but I prefer the shorthand method. Hopefully, this approach doesn't blow up the computer.
Akogo