>  기사  >  백엔드 개발  >  一些常用的php简单命令代码集锦_PHP教程

一些常用的php简单命令代码集锦_PHP教程

WBOY
WBOY원래의
2016-07-21 15:54:531025검색

删建:
 引用
if(file_exists("file.htm"))// 检查是否存在此文件
if(file_exists("chat"))//检查是否存在此文件夹
rename('index.php','index'); //将index.php 改名为 index
fopen("name.php","a+"); //建立文件
mkdir("boot","0777"); //建立文件夹且设置属性为777
rmdir ("include");//删除文件夹
unlink("index.php");//删除文件 

数据库的查询:
 引用
$db = new db_query;
$db->connect();
$db->query("DROP DATABASE $DbName;");//$dbname 为数据库名

连接:
 引用
header("location:index.php");//转到网页
echo "第二步:请选择是否删除所有文件[聊天室]
";//写出代码
unset($tmp); //清除原有缓存
require("global.php");//缓存
print eot;

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/318414.htmlTechArticle删建: 引用 if(file_exists("file.htm"))//检查是否存在此文件 if(file_exists("chat"))//检查是否存在此文件夹 rename('index.php','index');//将index.php改名为in...
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.