- Consider implementing a chroot jail
- Check user supplied files or filenames
- Strongly validate user input, Ensure that all variables
are properly initialized prior to the first use
- Disable allow_url_fopen and allow_url_include
- Disable register_globals and use E_STRICT to find uninitialized variables
- Ensure that all file and stream functions (stream_*) are carefully vetted
- To avoid being injected with remote files, it is essential to specify exactly
where the file should be located, e.g. its full path
- Secure Code, If you want to use include() function, For example: