For reasons beyond my control, I need to accept user/visitor requests to check for and include files from the server. The files that will be requested and included have to be in the directory or one of the subdirectories of the script that loads them, so nothing higher up in the file tree. Also, nothing from the folder named /resources/ should be accessible.
Is it enough to check for '../' and 'resources/' in the request string to make including these files safe? If not, what else should I be looking for?