Jump to content

[SOLVED] validate include, include_once, require, etc..


darksniperx

Recommended Posts

Another option is to do something like

 

if (@include('whatever.file')) {

// was able to include file

} else {

// wasn't able to include file

}

 

the @ suppresses the error message if it isn't there, and it will return true or false if it was able to include the file or not.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.