Posted by Martin Jay on 05/19/06 20:51
In message <IOqdnZwCTY41ZvDZRVn-pw@comcast.com>, Eric <nospam@email.com>
writes
>Martin Jay wrote:
>> From the PHP manual:
>>
>> <?php
>> $filename = '/path/to/foo.txt';
>>
>> if (file_exists($filename)) {
>> echo "The file $filename exists";
>> } else {
>> echo "The file $filename does not exist";
>> }
>> ?>
>How do i do that from javascript? Can i call it somehow? I'm in a javascript
>loop looking at a series of files, and if one is missing i need to break
>out of the loop early.
Perhaps you should give us the full picture so we know what you're
trying to achieve.
The answer to: "Is it possible to check for existence of a file from a
web page using javascript?" is probably no. But there may be another
solution. Are you able to run scripts on your web server?
--
Martin Jay
Navigation:
[Reply to this message]
|