Collection of some commonly used PHP simple command codes_PHP tutorial

WBOY
Release: 2016-07-21 15:54:53
Original
1070 people have browsed it

Delete:
Reference
if(file_exists("file.htm"))//Check whether this file exists
if(file_exists("chat"))//Check whether this folder exists
rename('index.php','index'); //Rename index.php to index
fopen("name.php","a+"); //Create file
mkdir("boot ","0777"); //Create a folder and set the attribute to 777
rmdir ("include");//Delete the folder
unlink("index.php");//Delete the file

Database query:
Reference
$db = new db_query;
$db->connect();
$db->query("DROP DATABASE $DbName;" );//$dbname is the database name

Connect:
Reference
header("location:index.php");//Go to the web page
echo "Step 2: Please Choose whether to delete all files [Chat Room]
";//Write the code
unset($tmp); //Clear the original cache
require("global.php");//Cache
print <<< eot //Write the code
eot;

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318414.htmlTechArticleDelete: Reference if(file_exists("file.htm"))//Check whether this file exists if( file_exists("chat"))//Check whether this folder exists rename('index.php','index');//Rename index.php to in...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template