PHP 8.5.0 Alpha 2 available for testing

Voting

: four minus three?
(Example: nine)

The Note You're Voting On

trevorhawes2 at gmail dot com
4 years ago
NB: This function expects the full server-related pathname to work.

For example, if you run a PHP routine from within, for example, the root folder of your website and and ask:

$bstr = file_exists("/images/Proofreading_patients.jpg");

You will get FALSE even if that file does exist off root.

You need to add

$bstr = file_exists(__DIR_."/images/Proofreading_patients.jpg");

to get it to return TRUE - ie : /srv/www/mywebsite.com/public/images/Proofreading_patients.jpg

<< Back to user notes page

To Top