mona Posted October 16, 2006 Share Posted October 16, 2006 I have a question , I tried a simple example for html link inside php fileI have a file called file1.txt inside C:\I put the following lines in a file and named it myfile.html<html><a href='C:\file1.txt'> open file</a></html>here the link works and the file opens upon clickingif the same file I named it myfile.php and tried to run it using apache localhosthere when you click the link, nothing happen and the file didn't openwhy??knowing that if we put any website link it works , but if we put any file inside our computer it doesn't work.also, knowing that php is working very well on my computer Link to comment Share on other sites More sharing options...
justsomeguy Posted October 16, 2006 Share Posted October 16, 2006 Links on the web don't use local filesystems, so really it's not even worth it to try and get it to work, because you're not going to use it online anywhere.The reason PHP files do not get executed when you do that is because they are not in the web site's folder structure, so the server does not execute them. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now