SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 30 of 30
  1. #26
    SitePoint Wizard
    Join Date
    Nov 2005
    Posts
    1,191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by inclick View Post
    @hash
    stuff
    This is just not the case. Instead of trying to explain, here is evidence:
    I checked twitter, flickr, and sitepoint. All use the "relative" url /page.

    / is the apsolute path to the root of the web server. There is no need to use the full domain url. If you really still disagree, perhaps you can give a specific example to help us understand.

    @cutcopypaste
    The reason you won't get a clear answer is that there is more than one way to skin a cat.

  2. #27
    SitePoint Wizard rguy84's Avatar
    Join Date
    Sep 2005
    Location
    Durham, NC
    Posts
    1,659
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cutcopypaste View Post
    i would love to see a tutorial about this issue particular issue.. including absolute (rather than relative to accomodate includes inside includes) paths in a relative way (ie transportable from test server/localhost to live deployment). it seems to be asked a million places online all over the place and i don't see an clear step by step solution anywhere.
    What have you been searching for? I can find articles saying both sides...Each saying the other side is wrong. You are essentially wanting an article that says and ends all debate that says "PHP is better than ASP" OR "Windows is better than Linux/Max/etc." The only way I can think of "absolute (rather than relative to accommodate includes inside includes) paths in a relative way " is a test and live box. I have had experience with this at work, and have zero idea how it works. I only know after my boss says ok, i do an install terminal command that copies from dev to live. We strictly use relative links.

    Off Topic:

    the article titles suggested do not necessarily reflect my opinions
    Ryan B | My Blog | Twitter

  3. #28
    SitePoint Zealot
    Join Date
    Feb 2009
    Posts
    194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well perhaps i am getting confused because i think some answers are about doing it the same way when really they are completely different. I just wnat to get includes within includes referenced from different directories set up so that i can migrate from test server to hosting server with minimum fuss, preferably not having to edit php.ini because that's a whole nother can of worms. if i saw two examples of how to do it, or even three or four, and pros and cons etc... i just don't know enough to piece the fragments i've been finding out there together.

  4. #29
    SitePoint Wizard
    Join Date
    Nov 2005
    Posts
    1,191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Step 1. Use this to include files:
    PHP Code:
    include $_SERVER['DOCUMENT_ROOT'].'path/to/files/file.php'
    Step 2. Make sure your test site and your live site have the same directory structures with regards to the doc root:
    dev: C:/mamp/site/path/to/files/file.php
    live: /home/user/public_html/path/to/files/file.php

  5. #30
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,527
    Mentioned
    84 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by cutcopypaste View Post
    I just wnat to get includes within includes referenced from different directories set up so that i can migrate from test server to hosting server with minimum fuss
    Then just use the standard document root as your base reference.

    Code php:
    require_once $_SERVER['DOCUMENT_ROOT'] . '/path/file.php';
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •