1

I'm trying to find the path of the folder outside my current folder. I'm using a button to redirect to another page. But the page I want to redirect is outside the folder.

<input type="button" value="Back to Main Menu" onClick="location.href='./guestStart.php'" >

The file "guestStart.php" is outside the folder of the current page.

Does anybody know how? Thanks for the help guys!

2
  • outside which way? higher (parent)? or lower (child)? parents, you can use ../ Commented May 19, 2015 at 14:40
  • I want to redirect the page child(inner folder) to parent(outside folder). Commented May 19, 2015 at 14:49

1 Answer 1

2

yes you can get move backward by typing ../ as many time as you need to then specify your file ie: if your index.php/html is in project1/date1/x1 and the file you want it to link is in project1/date3/x4 you will need to type

<a href="../../date3/x4/guestStart.php">link</a>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.