How to restrict file system access in PHP?
问题 Someone knows a trick to have a PHP script self-restrict access to the file system ( fopen , file_get_contents etc.)? Such calls should be blocked except for a handful of selected file names (log file, access to /tmp and similar). This is not a security thing , but rather a means of forcing the development team not to access the file system directly (and detect spots in existing code, where this is already the case). We want to see an exception in that case (which gets caught and reported),