php 文件安装方法

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=?phpn$hostname_conn=’.$_POST[‘hostname’].’;n$database_conn=’.$_POST[‘database’].’;n$username_conn=’.$_POST[‘username’].’;n$password_conn=’.$_POST[‘password’].’;n$dbprefix=’.$_POST[‘dbprefix’].’;n$conn=mysql_connect($hostname_conn,
$username_conn, $password_conn) or
die(”);nmysql_select_db($database_conn,
$conn);.(chksqlv()?nmysql_query(SET NAMES ‘gb2312’,
$conn);n$charset_conn=1;:”).n?;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
‘div class=msg_v’.$msg.’/div’;?div class=title第1步:配置MySQL/divdiv
class=lcontentform method=post
onsubmit=if(document.form1.hostname.value==” ||
document.form1.database.value==” ||
document.form1.username.value==”){alert(‘请输入主机名、数据库名、用户名。’);return
false;} name=form1div class=formlinelabel
for=formhostname主机名:/labelinput name=hostname id=formhostname
size=32 value=localhost//divdiv class=formlinelabel
for=formdatabase数据库名:/labelinput name=database id=formdatabase
size=32//divdiv class=formlinelabel for=formusername用户名:/labelinput
name=username id=formusername size=32 value=root//divdiv
class=formlinelabel for=formpassword密码:/labelinput name=password
id=formpassword size=32//divdiv class=formlinelabel
for=formdbprefix表前缀:/labelinput name=dbprefix id=formdbprefix
size=32 value=alu_//divdiv class=formlineinput type=submit value=下一步
id=formsubmit class=button / input type=reset value=重置 class=button
//div/form/div?php}}else{echo ‘div
class=gcontent要安装’.$app_n.’,请先删除’.$b_file.’。/div’;}echo
getsfoot();}else{header(‘Location:../’);