Need change to the path for this php code. Please help

Discussion in 'HTML & Website Design' started by aaronsunkist, Nov 24, 2008.

  1. #1
    i have this php code:

    <a href='<?php
    $ex=explode("/", $_SERVER['SCRIPT_NAME']);
    $fn=$ex[count($ex)-1];


    $path=str_replace($fn,"",$_SERVER['SCRIPT_NAME']);
    $path=substr($path, 1);
    echo $site.$path; ?>'><img src='<?php echo $site.$path; ?>images/logo.gif' ></a>

    now, i want the path to be going to: http://babyphotobattle.com/aboutus.php istead of going to the index file.

    obviously, i dont know how to work on php so any help will be highly appreciated. thanks.
     
    aaronsunkist, Nov 24, 2008 IP
  2. aaronsunkist

    aaronsunkist Active Member

    Messages:
    212
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    73
    #2
    anybody, willing to help?
     
    aaronsunkist, Nov 24, 2008 IP
  3. Limotek

    Limotek Peon

    Messages:
    165
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    What page is this code running from?

    Please show where $site is initialised. Also, please echo the variables $ex, $fn, $site and $path and post the results here.
     
    Limotek, Nov 25, 2008 IP
  4. saram

    saram Greenhorn

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #4
    your details not enough for help you.
     
    saram, Nov 25, 2008 IP
  5. saram

    saram Greenhorn

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #5
    your details not enough for help you.
     
    saram, Nov 25, 2008 IP