Re: Displaying files
| From: | Dan Shirah | Date: | Fri, 15 Aug 2008 14:17:04 +0000 |
| Subject: | Re: Displaying files | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-278138@lists.php.net to get a copy of this message | ||
> What about using some type of a dispatch script? Locate all the files
>> outside of the doc root and then just call: viewdocument.php?ID=12345678 ?
>> Although now that I've typed that I realize that you would still be running
>> the same issue.. Unless you used javascript in your PHP to call the file
>> maybe?
>
>
Hmmm, what if I tried to use PHP to write a simple batch file? Use the
batch file to copy the selected file from one server to another. And then
open the copied file using any method I wanted since it's new location would
be in a temp directory?
And then maybe use if_exists() to see if the new file is located in the temp
directory and if it is, display it.
The only issue there might be when a file is really large or the network is
sluggish and it could take 1-5 seconds for the file to copy over. In which
case if_exists() would be false since it is taking a while for the file to
copy. Hmmm.