You are here: Re: PHP Includes w/ Multiple Servers / File Structures « PHP Programming Language « IT news, forums, messages
Re: PHP Includes w/ Multiple Servers / File Structures

Posted by Rik on 03/07/07 18:39

Areric <josh.schramm@gmail.com> wrote:

> Hey All,
>
> I'm trying to get feedback on how people handle "elevating" code from
> a development environment to a production or qa environment.
>
> Mainly my concern lies in how people manage php include statements.
> Generally my sites are developed locally on my machine, then elevated
> to a shared hosting environment as their "production" server. In the
> past i've run into nothing but problems using include statements as
> the file structures don't mimic each other. Now, the file structures
> are obviously identical when you compare anything below my web sites
> root folder but when you look at the entire heirarchy it never works
> right.
>
> I have tried relative pathing, but i find that if i use relative
> pathing to include a file in another folder, and that file in turn
> includes another file it never can resolve the path correctly.

Include relative to the document-root ($_SERVER['DOCUMENT_ROOT'] normally).

Also, for classes & php5, check the __autoload() function.

--
Rik Wasmus
Posted on Usenet, not any forum you might see this in.
Ask Smart Questions: http://tinyurl.com/anel

 

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

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