Please show me the Link. If the Link looks like this:
- Code: Select all
<a href="file:\\\C:/xampp/htdocs/file.php">Link</a>
Then it would be the same as open the file via File -> Open File...
Your Link must look like this:
- Code: Select all
<a href="http://localhost/file.php">Link</a>
on the other hand, if you use such links you will get in troubles when you upload them onto an public server, as localhost always refers to the own computer, so most of your visitors will not see anything, the others will see their own local Webserver
You can use it also in this way:
- Code: Select all
<a href="/file.php">Link</a>
but only if the file which contains the link is in the same directory as file.php and it is called via the Webserver too!
For example:
test.php:
- Code: Select all
<html>
<head>
<title>Test</title>
</head>
<body>
<a href="/output.php?link=1">Link 1</a><br />
<a href="/output.php?link=2">Link 2</a>
</body>
</html>
output.php:
- Code: Select all
<?php
if(empty($_GET['link'])){
header("Location: /test.php");
exit();
}?>
<html>
<head>
<title>Follow Up</title>
</head>
<body>
You clicked Link No. <?php echo $_GET['link']; ?>
</body>
</html>
Put both files in C:\xampp\htdocs (or wherever you installed XAMPP) and call
http://localhost/test.php
glitzi