Re: include() and require() problem
| From: | Michael Virnstein | Date: | Fri, 19 Apr 2002 14:33:47 +0000 |
| Subject: | Re: include() and require() problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-93708@lists.php.net to get a copy of this message | ||
be sure that the path to the include file is relative to the script that was
requested
by the user. that's important if you include include-files into included
files.
you then have to make sure that the path to your include-file in the
include-file is
relative to the file that included the file, in which the include-file is
included.
*lol* what a sentence. anyway, hope you get my meaning!
another problem is using include "/myincfiles/myfile.inc";
this way it could be searched in the root of the server, where for sure
your file can't be found. use relative path instead:
include "./myincfiles/myfile.inc";
"./" means the same directory.
or use an absolute path, which has to contain the whole path from the
server's root, e.g.:
include "/wwwroot/somedir/yourdocroot/myincfiles/myfile.inc";
Regards Michael
"Rodrigo Peres" <rperes@mac.com> schrieb im Newsbeitrag
news:77EA65B2-539E-11D6-926F-0050E4D03060@mac.com...
> List,
>
> I'm trying to include some .inc files in my project, but I got errors
> all time saying that this includes couldn't be found. I'm a newbie, so I
> can't understand what's happend, since it worked pretty good in my local
> machine and not in the ISP. I tried to speak to ISP many times but they
> couldn't solve to.
> My directorie structure is : HRM(directorie)->includes(directorie)->my
> inc files(to be included in files that is in the directorie HRM).
>
> Thank's
>
> Rodrigo
>