You are here: Re: include within include, using a relatve path « PHP Programming Language « IT news, forums, messages
Re: include within include, using a relatve path

Posted by Jerry Stuckle on 09/28/18 12:01

Sebastian Lisken wrote:
> Jerry Stuckle <jstucklex@attglobal.net> wrote:
>> It's very easy. Make every include absolute. You can find the path to
>> the server's document root via $_SERVER['DOCUMENT_ROOT']. Reference
>> every include from there and you'll be in much better shape.
>
> Thanks Jerry, I know this would be a solution. I did consider this near
> the end of my (admittedly very long) post and explained why I regard
> such a solution less than ideal. Could you think of another one not
> using the document root?
>
> Sebastian Lisken
>
>

Yes, I read that. But there isn't a better one.

You should *always* know where a file is relative to DOCUMENT_ROOT. And
it can be above the directory.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация