upload a file:

alert("creat_db.php 連結資料庫失敗!"); '; exit; } if ( !mysql_query ("DROP DATABASE IF EXISTS `hw3`") ) { echo ''; exit; } @mysql_query("SET NAMES 'utf8'"); if ( !mysql_query ("CREATE DATABASE IF NOT EXISTS `hw3` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; ") ) { echo ''; exit; } if ( file_exists ( $path.$mysql_txt) ) { mysql_select_db($mysql_database) or die('Error selecting MySQL database: ' . mysql_error()); $templine = ''; $lines = file($path.$mysql_txt); foreach ($lines as $line) { if (substr($line, 0, 2) == '--' || $line == '') continue; $templine .= $line; if (substr(trim($line), -1, 1) == ';') { mysql_query($templine) or print('Error performing query \'' . $templine . '\': ' . mysql_error() . '

'); $templine = ''; } } } } // 顯示 if( file_exists( $rootFileName ) ) { $d = dir( $rootFileName.'\\' ); ?> read() ) { ?> 3 ) { $path = $rootFilePath.$entry."/"; ?> '; else if( file_exists( $path."desc.html" ) ) echo '功能'; else echo "無"; ?>'; else if( file_exists( $path."index.html" ) ) echo '入口'; else echo "無"; ?>close(); } // --- 函數區 --- function uncompress($file,$descdir){ include_once "pclerror.lib.php"; include_once "pcltrace.lib.php"; include_once "pclzip-trace.lib.php"; $zip = new PclZip($file); $only_dir = "Y"; if (($list = $zip->listContent()) == 0) { die("Error : ".$zip->errorInfo(true)); } for ($i=0;$iextract(PCLZIP_OPT_PATH, $descdir, PCLZIP_OPT_REMOVE_PATH, $remove_dir) == 0) { die("Error : ".$archive->errorInfo(true)); } } ?>
學號 介紹 網頁
功能 入口