简体   繁体   中英

link to path outside of localhost folder using href

Problem:

localhost folder is: D:\my_files\project\public

Web Server: Apache HTTP Server

so when I type http://localhost, it goes to D:\my_files\project\public

Structure:

/my_files/project/public/index.php

/my_files/project/src/tech.php

What I want:

<a href="/../src/tech/tech.php">Tech</a>

When clicking the link above it should take me to out of localhost folder inside src folder.

You can not access your folder like this since it is not in the Localhost folder. You have two solutions

  1. Change Localhost default folder to the parent folder:

myfiles/project

  1. Copy you test.php file to your current localhost folder, with all his dependiencies

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM