A PHP file is a server-side script, typically containing PHP code, that a web server can execute to generate pages or perform other tasks. Unlike a static image or text file, it can run with the permissions and access available to the web server.
In cyber security, an attacker who can place or modify a PHP file in an executable web directory may be able to run code on the server, potentially enabling remote access, data theft, or further compromise. Attacks may exploit a vulnerable upload or remote-fetch feature to store a malicious script. Defenders should restrict and validate uploads, prevent execution in directories used for uploaded content, monitor for unexpected PHP files, and investigate suspicious files rather than simply deleting them.


