Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is_file - checking for a file on my hard drive

Status
Not open for further replies.

daybase

Technical User
Dec 13, 2002
115
GB
I am running a series of web pages which are very graphic intensive but many of the graphics will already be on our desktop PC's as they are standard corporate diagrams & files. To minimise download time etc the pages have been coded to use these images rather than files on the server. Occasionally they are missing and I would like to check whether they exist and if they do read from hard disk and if not then use the images from the server. I had hoped is_file() would be the answer but I understand it will only work on the server. Any solutions for this simple little query please?
 
PHP runs on the server. It can't check for files on clients.

This wall between the two is a deliberate security feature that is only broken by security-dimwitted software like ActiveX



Want the best answers? Ask the best questions! TANSTAAFL!
 
Like sleipnir says - you can't check clientside with PHP as it's running serverside.

But unless the users clears their browser cache it should't be a problem.

An alternative would be to run a proxy like:


It's both free & commonly used. But again - I'd rely on the browser cache. Shouldn't be too big a deal.

Did you do any monitoring of the load? What server are you using? And what browser, for that matter?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top