How to change to directory when I click on link in PHP?

Just put a / in the URL.

<a href="https://stackoverflow.com/questions/23563839/output/hello.php">

Leave a Comment