Posted by Jerry Stuckle on 05/08/06 21:51
Chuck Anderson wrote:
> TristaSD wrote:
>
>>> I'm trying to point to an include file from php like so:
>>>
>>> <?php require('/main/includes/nav_stripe.php');?>
>>>
>>> That approach is perfectly fine when trying to point to a folder
>>> INCLUDES inside folder MAIN on the root IN HTML. However, php is
>>> producing errors.
>>>
>>> Is there a solid safe way to reference a file/folder regardless of how
>>> many levels up or down it is?
>>>
>>>
>
> Set the include_path configuration directive to an absolute path (where
> you then keep your include files) and then all you need do is include
> the filename (with no path).
>
That's great if you have access to the configuration. Most shared hosts don't
allow it. And doing it in .htaccess is less efficient.
This works with any Apache host and doesn't require .htaccess.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|