bobnmo78 Posted August 1, 2009 Share Posted August 1, 2009 I have seen this used at the top of all non parent PHP files, // no direct access defined( '_EXEC' ) or die( 'Restricted access' ); is this a correct way? Link to comment https://forums.phpfreaks.com/topic/168398-php-coding-security-no-direct-access-is-this-corrcet/ Share on other sites More sharing options...
GingerRobot Posted August 1, 2009 Share Posted August 1, 2009 A quick google search showed up that Joola uses something similar to prevent access to files which are included by others. So yes, if you are using this in the same way and defining that constant on the pages which include these files, then it will work. However, i'd prefer to place files which i don't want to grant access to outside of the web root. Link to comment https://forums.phpfreaks.com/topic/168398-php-coding-security-no-direct-access-is-this-corrcet/#findComment-888282 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.