Click here to Skip to main content
15,905,322 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have hosted a file in my web hosting called 'test.html'.
For example the url is: www.example.com/test.html.
Now how to check if test.html is available or not in my web hosting.
Posted
Comments
Sergey Alexandrovich Kryukov 1-Dec-13 13:40pm    
Why? Looks like a totally artificial problem. If you deployed it, it is there. If not, you don't have reliable hosting to bother about it...
—SA

1 solution

If you want to check whether the file is hosted or not you can test the file with the domain name/yourfilename.extension. but if you want to do programatically then I think u need to check in your hosting server connected from your application. I dont know how you want to check your file in the hosting server.

If my assumption is right you want to check for a file in the server thru your application, then try this link dude
http://stackoverflow.com/questions/4852767/how-can-i-check-if-a-file-exists-on-a-remote-server-using-php[^]
or
http://stackoverflow.com/questions/17654167/php-script-to-check-on-remote-server-a-file-exists[^]
one of the links answers might helps you, just give a try and let us know if this does not works

Thanks
Ganesh
 
Share this answer
 
Comments
Alamgirable 1-Dec-13 12:20pm    
Can you please give me Code example.
Alamgirable 1-Dec-13 13:12pm    
file_exists() not works for me....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900