Some common PHP simple command code collection _php Tips
Source: Internet
Author: User
Delete the construction:
Reference
if (file_exists ("file.htm"))//check for the existence of this file
if (file_exists ("chat"))//Check if this folder exists
Rename (' index.php ', ' Index '); Rename the index.php to index
fopen ("name.php", "A +"); Create a file
mkdir ("Boot", "0777"); Create a folder and set the property to 777
RmDir ("include");//Delete folder
Unlink ("index.php");//delete file
Query for database:
Reference
$db = new Db_query;
$db->connect ();
$db->query ("DROP DATABASE $DbName;"); /$dbname is the database name
Connection:
Reference
Header ("location:index.php");/Go to Web page
echo "Step two: Please choose whether to delete all files [chat room]<br>";/write code
Unset ($TMP); Clear the original cache
Require ("global.php");//cache
Print <<< EOT//write code
EoT
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service