php 文件安装方法
require_once('inc.php');
if(!file_exists($l_file)){
echo getstop();
if(!file_exists($c_file)){
if($_SERVER['REQUEST_METHOD']=='POST' && $_POST['hostname']!='' && $_POST['database']!='' && $_POST['username']!=''){
if(@mysql_connect($_POST['hostname'], $_POST['username'], $_POST['password'])){
if(mysql_select_db($_POST['database']) || mysql_query('CREATE DATABASE '.$_POST['database'])){
$c_content="";
writeText($c_file,$c_content);
}else{
$e=1;
}
}else{
$e=2;
}
echo '<script type="text/JavaScript">'.(isset($e)?'location.href='?e='.$e:'location.href='mysql.php').'';</script>';
}else{
if(isset($_GET['e']))$msg=$_GET['e']==2?'无法连接数据库!':'无法建立数据库!';
if(isset($msg))echo '
';
?>
}
}else{
echo '
';
}
echo getsfoot();
}else{
header('Location:../');
php免费学习视频:立即使用
踏上前端学习之旅,开启通往精通之路!从前端基础到项目实战,循序渐进,一步一个脚印,迈向巅峰!











