1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2026-03-31 00:40:08 +02:00

🐛 Clean up temporary files prior to phpinfo()

This commit is contained in:
2026-02-06 15:00:18 +01:00
parent c9d1d35724
commit 604abc5704

View File

@@ -123,6 +123,11 @@ class Actions {
// MARK: - Other Actions
public func createTempPhpInfoFile() async -> URL {
// Clean state for temporary phpinfo files
try? container.filesystem.remove("/tmp/phpmon_phpinfo.php")
try? container.filesystem.remove("/tmp/phpmon_phpinfo.html")
// Generate a source file that we will execute immediately
try! container.filesystem.writeAtomicallyToFile("/tmp/phpmon_phpinfo.php", content: "<?php phpinfo();")
// Tell php-cgi to run the PHP and output as an .html file