Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End PHP Header

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #24415
    mdgrech
    Member

    What I have:
    header(‘Location: index.php’);

    Where its taking me:
    http://localhost/sm/system/forms/index.php
    results in a page not found cause index php is located at http://localhost/sm

    So I’m looking for something like header(‘Location: ../index.php’) to get back to the main directory. Any ideas?

    #55300
    TheDoc
    Member

    Does ../index.php not work?

    #55301
    mdgrech
    Member

    Nope, does make it any difference at all…its still looking in http://localhost/sm/system/index.php

    #55304
    mdgrech
    Member

    Figured it out…I needed one more ../ so I ended up with:
    header(‘Location: ../../index.php’);

    so use one ../ for each directory you want to go back. I could of sworn you only needed one ../ to get back to the main dir, guess not.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Back End’ is closed to new topics and replies.