PHP determines whether the directory file exists

A simple piece of PHP to judge whether there is code in the directory file , save it and record it, it will definitely be used in the future.

1

2

3

4

5

6

7

8

9

<?php

$filename '../../e/install/';

  

if (file_exists($filename)) {

    echo "<h3><div align='center'><font color='#FF0000'>存在安全风险!请将 $filename 文件夹删除或改名!</font></div></h3>";

else {

    echo "<h3><div align='center'><font color='#FF0000'> (☆_☆)文件夹 $filename 以删除或改名  (☆_☆)</font></div></h3>";

}

?>

Guess you like

Origin blog.csdn.net/winkexin/article/details/131947073