Re: Displaying files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 15 Aug 2008, at 15:17, Dan Shirah wrote:
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.

PHP *cannot* access those files. Doesn't matter if you call a batch file from the PHP since that will still be running as PHP.

Your best bet would be to run a periodic sync to copy the files across from the other server but it would have to run outside the IIS process. There are plenty of solutions around for doing this and they have nothing to do with PHP. You can then refer to the local copy of the file from PHP and it will then work.

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux