Page 1 of 1

about file_exists

Posted: Fri Jun 20, 2008 5:54 am
by vb_123
hello friends,
i want to know if "file_exists" function works on server or not??? i am giving image link path and checking it thru file_exists.but it is alwaz going on else part .is there any substitute of this function which works fine on server??

Re: about file_exists

Posted: Fri Jun 20, 2008 5:59 am
by Kieran Huggins
Dollars to doughnuts it's a path issue. Try prepending $_SERVER['DOCUMENT_ROOT'] to the front of your path.

Re: about file_exists

Posted: Fri Jun 20, 2008 11:34 am
by LBmtb
Also check to make sure you have read access to that file. Try doing "is_readable('/path/to/your/image/')" to see if you have access to the directory that the image is under.