[pmwiki-users] link a file

Joachim Durchholz jo at durchholz.org
Fri May 5 02:21:09 CDT 2006


Ron Emch schrieb:
> I've looked, but cannot find any instructions on how to create a link for a file.
> 
> Can it be done?
> 
> I've tried [[file://path/filename]], but that doesn seem to work.

The syntax is:

   file://
then the file path.

On a Unix system, that would be
   file:///absolute/path

On a Windows system, it would be
   file://C:\absolute\path
though browsers may also accept
   file://C:/absolute/path

For relative paths, you'll have URLs like
   file://relative/path
which should be largely OS-independent for reasonably smart browsers.


(Note PHP code won't run if called through a file:// URL. You'll need a 
web server running on localhost, which - as a side effect - will also 
provide standard http:// URLs for files on your local system 
http://localhost/path/uploads/blah.gif in addition to the file:// URLs.)

HTH
Jo




More information about the pmwiki-users mailing list