Re: Serve a file using PHP

From: Date: Tue, 26 Aug 2003 16:51:34 +0000
Subject: Re: Serve a file using PHP
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-160805@lists.php.net to get a copy of this message
From: "Grant Rutherford" <grutherford@iders.ca> > Is there a way that PHP can allow a user to browse the files on the > server's network, and ultimately send the file to the user? > > I'm making a database interface with PHP to be used internally on our > network. Through a PHP interface, the user wants to browse their > network and find a file, and insert the file's path into the database. > The user then wants the database to display a link, which when clicked > will open the file. They want this to work in Mozilla or IE, on both > windows and linux machines. I tried making the path a link with > file://"path", but Mozilla wouldn't follow the link (probably a security > thing; it makes sense that links shouldn't open local files). > > Is there a way that I can give PHP the network path (through $_POST for > example), and it would return the file instead of an HTML document? Can't you just link to \\computer_name\path\to\file.doc (or whatever the filename is) ? file:/// would try to load it off of their machine, not a network machine. ---John Holmes...

« previous php.general (#160805) next »