PHP Includes w/ Multiple Servers / File Structures

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Areric

    PHP Includes w/ Multiple Servers / File Structures

    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.

    So any input on this odd problem would be appreciated.

    Thanks

  • Rik

    #2
    Re: PHP Includes w/ Multiple Servers / File Structures

    Areric <josh.schramm@g mail.comwrote:
    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

    Comment

    Working...