⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 install.php

📁 1.上传所有文件到你的空间。 2.把数据库文件FORUM.sql导入数据库。 3.修改config.php 和 data文件夹属性为0777。 4.后台管理地址:/admin/login.php
💻 PHP
字号:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>安装 我的BT发布系统V1.0beta2</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
}
.STYLE2 {
	font-family: "新宋体";
	font-size: 14;
	color: #000000;
}
.STYLE6 {font-family: "新宋体"; font-size: 12px; color: #000000; }
-->
</style></head>

<body>

<? 
$id=$_POST[id];
if($id==setup1)
{
echo "$errdb";
?>
<table width="1006"  height="400" border="0">
  <tr>
    <th width="177" scope="col">&nbsp;</th>
    <td width="633" align="left" valign="top" scope="col">
	 <form name="form2" method="post" action="">
	<p align="left" class="STYLE6">设置数据库连接</p>
      <p align="left" class="STYLE6">主机:
        <input name="host" type="text" id="host" value="localhost">
      </p>
      <p align="left" class="STYLE6">用户:
          <input name="user" type="text" id="user" value="root">
        </p>
      <p align="left" class="STYLE6">数据库:
        <input name="db" type="text" id="db">
      </p>
        <p align="left" class="STYLE6">密码:
          <input name="pw" type="text" id="pw">
      </p>
      <p align="left" class="STYLE6">
        <input type="hidden" name="id" value="setup2"/>
      </p>
      <div align="center">
        <input type="submit" name="Submit" value=" 下 一 步" />
      </div>
    </form>
    <p align="center" class="STYLE2">&nbsp;</p>    </td>
    <th width="182" scope="col">&nbsp;</th>
  </tr>
</table>


<?
}

else if($id==setup2)
{
	$tdbhost="$_POST[host]";               //主机
	$tdbuser="$_POST[user]";                    //用户
	$tdbpassword="$_POST[pw]";                      //密码
	$tdatabase="$_POST[db]";                    //数据库
			$connet=@mysql_connect("$tdbhost","$tdbuser","$tdbpassword");
	   		$seledb=@mysql_select_db($tdatabase,$connet); 
if ($connet)
{
echo "<center>数据库用户名密码<font color=red>正确!</font><br />";

if ($seledb==1)
{
echo "<center>连接数据库<font color=red>成功!</font><br />";
//写入config.php文件
$filecontent="<?
\$dbhost=\"$_POST[host]\";               //主机
\$dbuser=\"$_POST[user]\";                    //用户
\$dbpassword=\"$_POST[pw]\";                      //密码
\$database=\"$_POST[db]\";                    //数据库
	

			\$connet=@mysql_connect(\"\$dbhost\",\"\$dbuser\",\"\$dbpassword\");
	         @mysql_select_db(\$database,\$connet); 
?>
";//修改后的内容

//写入数据库

$SQL1="CREATE TABLE `article` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`title` CHAR(100)NOT NULL ,
`content` TEXT NOT NULL ,
`importtime` DATETIME NOT NULL ,
`writer` VARCHAR(20)NOT NULL ,
`click` TINYINT( 4 ) NOT NULL,
`parent` TINYINT( 4 ) NOT NULL,
`adda`  TEXT NOT NULL ,
`fl`  TEXT NOT NULL 
) TYPE = MYISAM ";

  $result = @mysql_query("DROP TABLE IF EXISTS `article`");

  $result=@mysql_query("$SQL1");

if($result==1)
{
echo "写入数据库<font color=red>成功</font>!";
}
else {
echo "写入数据库<font color=red>失败</font>!";
}

echo "<br />
<br /><br /><br />立即<a href=./admin/login.php>进入后台管理</a> <a href=./index.php>首页</a>

<br /><br /><br />请配置正确之后,用FTP删除此install.php文件!";
}
else 
{
echo "<center>连接数据库<font color=red>失败</font>,请检查数据库名是否<font color=red>出错</font>。<br /> <INPUT TYPE='button' VALUE=' 上 一 步 ' onClick='history.go(-1)'>";

}


}
else{
echo "<center>数据库用户名密码<font color=red>错误!</font><br /><INPUT TYPE='button' VALUE=' 上 一 步 ' onClick='history.go(-1)'>";

}
}
else

{
?>


<table width="1006"  height="400" border="0">
  <tr>
    <th width="177" scope="col">&nbsp;</th>
    <td width="633" align="left" valign="top" scope="col"><p align="left" class="STYLE6">&nbsp;</p>
      <p align="left" class="STYLE6">&nbsp;</p>
      <p align="center" class="STYLE6">我的BT发布系统V1.0beta2 声明</p>
    <p align="left" class="STYLE6">本程序是免费的,开源的。我们欢迎大家一起来完善它。您可以自由使用本程序。</p>
    <p align="right" class="STYLE6">  我的BT发布系统工作室 PHP开发小组 </p>
    <p align="right" class="STYLE6">&nbsp;</p>
    <form id="form1" name="form1" method="post" action="">
      <input type="hidden" name="id" value="setup1"/>
      <div align="center">
        <input type="submit" name="Submit" value=" 同 意 " />
      </div>
    </form>
    <p align="left" class="STYLE6">&nbsp;</p>
    <p align="left" class="STYLE6">&nbsp;</p>
    <p align="left" class="STYLE6">作者:我的BT 官方网站:<a href="http://5dbt.cn" target="_blank">我的BT</a></p>
    <p align="center" class="STYLE2">&nbsp;</p>
    </td>
    <th width="182" scope="col">&nbsp;</th>
  </tr>
</table>
<?
}
?>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -