Main Content

A lion in a cage - PHP

Archive - Originally posted on "The Horse's Mouth" - 2006-11-10 18:34:07 - Graham Ellis

A lion in a cage shouldn't be a danger - but release the lion from the cage and you could be at risk.

An include file that's pulled in by a PHP script shouldn't be a danger if it's used only from within that PHP script, but if it has its own URL the it could be released like the lion, and it could be a danger. If you're writing a PHP script that requires or includes files, please put the included files in a directory that's NOT got its own URL .... you can do it by giving a path to the file in the include or require statements, or by using the preconfigured directory that's set up on your PHP installation.


Image from Hone's Everyday Book