Jump to content

Links To Files On Internet Server


cit

Recommended Posts

In a php page I want to set up links to files, with file extensions ".txt",".pdf" and ".xls". The files is located on the companys server. I am developing this PHP page on a PC with WAMP installed. My attempts to do this :) failed: echo "<BR><a href=\"http://localhost/W://Market/list.txt\">List.txt</a>"; echo "<BR><a href='file:///W:/Market/list.txt'>List.txt</a>";Do you have a suggestion to make such links work?

Link to comment
Share on other sites

The localhost domain points to a specific folder. You can't just access your whole computer with it. You can only access the www directory that's in WAMP. Put all the files you're going to use under [C or D or F or W ...]:/wamp/www/

Link to comment
Share on other sites

PHP would be able to access those files though, so you could develop a script where you pass the filename to PHP, which would go get it from the network and return it. It would be a major security problem to give anyone access to any file they typed in, but you could do it. You could also filter filenames to only return files with certain extensions.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...