How to open local files in a mac via browser

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Phil Gent
    New Member
    • Mar 2011
    • 13

    How to open local files in a mac via browser

    Hi,
    I am making a database based PHP site for my friend to run locally on his mac.

    He wants a page where he can click on a link to his most used files - word docs etc. stored on his desktop for instance.

    I thought this would be easy by using the following;-

    Code:
    <a href='file:///folder/word.doc'>Open file</a>
    I tested this on my PC at work (NOT on local webserver) and it opened files fine for me however I can't seem to open files on the mac via http://localhost/...

    Can anyone shed some light on this please ?
    Could this be a permissions issue ??

    Help much appreciated as I'm pulling my hair out
    Phil
  • MusoFreak200
    New Member
    • Oct 2009
    • 96

    #2
    phil gent,

    even though this is not a html/css question i can safetly say that this is probably caused by not having a mac php server set up on the mac system.
    if you would like to learn more on this subject invloving opening files on windows, mac, and linux/unix systems please refer to these published writings


    and this is the php server which is usable on all OS:
    A complete and ready-to-use PHP development environment on Windows including the web server Apache, the SQL Server MySQL and others development tools.


    i hope that helps and if it does please mark this reply as answer sovled
    okay enjoy

    Comment

    • Phil Gent
      New Member
      • Mar 2011
      • 13

      #3
      Thanks for your response Musofreak.
      I have Apache and MAMP installed and running with no problems.
      Irrespective of my PHP code, all I need to know is how to launch a file which is stored locally on the mac (in a folder that is not viewable by Apache server).

      If I type the path from the code above into the address bar of either Safari or Firefox then it will open the file, but the link itself does not work.

      Comment

      Working...