die(111); } */ $splstr = ''; $s = ''; $conn = OpenConn(); $parentid = ''; $title = ''; $lableName = ''; $content = ''; $tempS = ''; $url = ''; $isdisplay = ''; $nCount = ''; //echo('path='.handlePath('./../admin/后台菜单配置.ini')); $content = getftext(handlePath('./../admin/后台菜单配置.ini')); $content = Replace($content, "\t", ' '); $splStr = aspSplit($content, chr(10)); //不用vbCrlf() 是因为在上传到GitHut上去,下载下来它会把后台菜单配置.ini文件编码转成utf-8 20160409 $nCount = 0; foreach ($splStr as $s) { $tempS = $s; $s = AspTrim($s); if ($tempS != '' && substr(phptrim($s) . ' ', 0, 1) != '#') { $nCount = $nCount + 1; //总数 if (substr($tempS, 0, 4) == ' ') { } else { $parentid = '-1'; } if (trim(LCase($tempS)) == 'end') {
$dbname = $_POST['dbname']; $conn = @mysql_connect($dbhost, $dbuser, $dbpwd); if ($conn) { if (empty($dbname)) { $dbmsg = "<font color='green'>信息正确</font>"; } else { if (mysql_select_db($dbname, $conn)) { } else { //创建数据库 if (mysql_query("CREATE DATABASE " . $dbname, $conn)) { } else { echo "Error creating database: " . mysql_error(); } } $accessMsg = mysql_select_db($dbname, $conn) ? "<font color='red'>数据库已经存在,系统将覆盖数据库</font>" : "<font color='green'>数据库不存在,系统将自动创建</font>"; $content = getftext('conn.php'); $s = StrCut($content, 'dbhost=', "';", true, true); $content = str_replace($s, 'dbhost=\'' . $dbhost . '\';', $content); $s = StrCut($content, 'dbuser='******';", true, true); $content = str_replace($s, 'dbuser=\'' . $dbuser . '\';', $content); $s = StrCut($content, 'dbpwd=', "';", true, true); $content = str_replace($s, 'dbpwd=\'' . $dbpwd . '\';', $content); $s = StrCut($content, 'dbname=', "';", true, true); $content = str_replace($s, 'dbname=\'' . $dbname . '\';', $content); if (is_writable('conn.php')) { createFile('conn.php', $content); } else { echo "出错,没有权限操作文件,手动配置<hr>" . handlePath('conn.php') . '<hr>配置完成后再点下一步<hr>'; } step2(); exit;