Re: include hassle
| From: | Richard Lynch | Date: | Mon, 05 Aug 2002 05:43:36 +0000 |
| Subject: | Re: include hassle | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-111155@lists.php.net to get a copy of this message | ||
>I have this:
>
>//file1.php
><?
>include('../libs/lib1.php');
>..
>..
>..
>?>
>
>now lib1.php:
><?
>include ('helper.php');
>?>
>
>If i run file1.php ->includes lib1.php -> fails to include helper.php ! !
>
>how can i solve that?
>
>p.s: currently, i'm chdir()ing to the ../libs path, then i return to current
>dir...
Don't even try to keep track of where you are in the directory path and use
relative dirs when you are doing includes. That way lies madness.
>my code cannot make use of Apache's help. (like setting the include path
>inside .htaccess)
Why not?
If you can't edit php.ini and you don't have .htaccess turned on, you're
going to find yourself ham-strung even after you solve this one...
That said, the solution if you really are stuck with no .htaccess is to just
use a full path name from the root of the hard drive.
Oooooh. You can also set the include_path from *inside* your PHP script
with http://php.net/ini-set
--
Like Music? http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro). Need to record live events (mixed already) to stereo
CD-quality. Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff. Zero (0)
post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.