<td>字符串自动转义(magic_quotes_runtime)</td> <td>', 1 === get_magic_quotes_runtime() ? YES : NO, '</td> <td>数据反斜杠转义(magic_quotes_gpc)</td> <td>', 1 === get_magic_quotes_gpc() ? YES : NO, '</td> </tr> <tr> <td>POST提交最大限制(post_max_size)</td> <td>', getcon("post_max_size"), '</td> <td>上传文件最大限制(upload_max_filesize)</td> <td>', getcon("upload_max_filesize"), '</td> </tr> <tr> <td>脚本超时时间(max_execution_time)</td> <td>', getcon("max_execution_time"), ' 秒</td> <td>脚本占用最大内存(memory_limit)</td> <td>', getcon("memory_limit"), '</td> </tr> <tr> <td>PHP运行方式</td> <td>', strtoupper(php_sapi_name()), '</td> <td>被禁用的函数(disable_functions)</td> <td>', "" == ($disFuns = get_cfg_var("disable_functions")) ? "无" : str_replace(",", "<br />", $disFuns), '</td> </tr> </table>'; //require(TZ_ROOT.'php_zj.php'); echo ' <!-- ============================================================= PHP組件支援 ============================================================== --> <table width="100%" cellpadding="0" cellspacing="1" border="0">
function wel() { ?> </head> <body> <table class="index tb"> <tr> <td colspan="4">站点信息</td> </tr> <tr> <td width="90">服务器类型:</td> <td width="400"><?php echo PHP_OS; ?> </td> <td width="90">脚本解释引擎:</td> <td><?php echo $_SERVER['SERVER_SOFTWARE']; ?> </td> </tr> <tr> <td>站点物理路径:</td> <td><?php echo $_SERVER['PATH_TRANSLATED']; ?> </td> <td>服务器名:</td> <td><?php echo $_SERVER["SERVER_NAME"]; ?> </td> </tr> <tr> <td>访问远程URL allow_url_fopen:</td> <td><?php echo getcon("allow_url_fopen"); ?> </td> <td>访问远程URL curl_init:</td> <td><?php echo isfun('curl_init'); ?> </td> </tr> <tr> <td>mb_string 函数支持库:</td> <td><?php echo isfun("mb_convert_encoding"); ?> </td> <td>xml解析DOMDocument:</td> <td><?php echo isfun("dom_import_simplexml"); ?> </td> </tr> <tr> <td>单页最大使用内存 memory_limit:</td> <td><?php echo getcon("memory_limit"); ?> </td> <td>POST最大数据量 post_max_size:</td> <td><?php echo getcon("post_max_size"); ?> </td> </tr> <tr> <td>最大上传文件 upload_max_filesize:</td> <td><?php echo getcon("upload_max_filesize"); ?> </td> <td>页面最长运行 max_execution_time:</td> <td><?php echo getcon("max_execution_time"); ?> </td> </tr> <tr> <td>目录权限检测:</td> <td colspan=3><?php echo "/"; if (is_writable("../")) { echo "<font color=green>OK</font>"; } else { echo "<font color=red>NO</font>"; } echo "<br>/inc/"; if (is_writable("../inc/")) { echo "<font color=green>OK</font>"; } else { echo "<font color=red>NO</font>"; } echo "<br>/inc/config.php"; if (is_writable("../inc/config.php")) { echo "<font color=green>OK</font>"; } else { echo "<font color=red>NO</font>"; } echo "<br>/inc/ftp.php"; if (is_writable("../inc/ftp.php")) { echo "<font color=green>OK</font>"; } else { echo "<font color=red>NO</font>"; } echo "<br>/inc/cache.php"; if (is_writable("../inc/cache.php")) { echo "<font color=green>OK</font>"; } else { echo "<font color=red>NO</font>"; } // echo "<br>/inc/timmingset.xml"; // if(is_writable("../inc/timmingset.xml")){ echo "<font color=green>OK</font>";}else{ echo "<font color=red>NO</font>";} // echo "<br>/inc/voddown.xml"; // if(is_writable("../inc/voddown.xml")){ echo "<font color=green>OK</font>";}else{ echo "<font color=red>NO</font>";} echo "<br>/inc/vodplay.xml"; if (is_writable("../inc/vodplay.xml")) { echo "<font color=green>OK</font>"; } else { echo "<font color=red>NO</font>"; } // echo "<br>/inc/vodserver.xml"; // if(is_writable("../inc/vodserver.xml")){ echo "<font color=green>OK</font>";}else{ echo "<font color=red>NO</font>";} echo "<br>/inc/vodarea.txt"; if (is_writable("../inc/vodarea.txt")) { echo "<font color=green>OK</font>"; } else { echo "<font color=red>NO</font>"; } echo "<br>/inc/vodlang.txt"; if (is_writable("../inc/vodlang.txt")) { echo "<font color=green>OK</font>"; } else { echo "<font color=red>NO</font>"; } echo "<br>/upload/"; if (is_writable("../upload/")) { echo "<font color=green>OK</font>"; } else { echo "<font color=red>NO</font>"; } // echo "<br>/upload/art/"; // if(is_writable("../upload/art/")){ echo "<font color=green>OK</font>";}else{ echo "<font color=red>NO</font>";} echo "<br>/upload/vod/"; if (is_writable("../upload/vod/")) { echo "<font color=green>OK</font>"; } else { echo "<font color=red>NO</font>"; } echo "<br>/upload/cache/"; if (is_writable("../upload/cache/")) { echo "<font color=green>OK</font>"; } else { echo "<font color=red>NO</font>"; } echo "<br>/upload/export/"; if (is_writable("../upload/export/")) { echo "<font color=green>OK</font>"; } else { echo "<font color=red>NO</font>"; } echo "<br>/upload/topic/"; if (is_writable("../upload/topic/")) { echo "<font color=green>OK</font>"; } else { echo "<font color=red>NO</font>"; } echo "<br>/upload/thirdpartlogo/"; if (is_writable("../upload/thirdpartlogo/")) { echo "<font color=green>OK</font>"; } else { echo "<font color=red>NO</font>"; } // echo "<br>/upload/playdata/"; // if(is_writable("../upload/playdata/")){ echo "<font color=green>OK</font>";}else{ echo "<font color=red>NO</font>";} // echo "<br>/js/player.js"; // if(is_writable("../js/player.js")){ echo "<font color=green>OK</font>";}else{ echo "<font color=red>NO</font>";} // echo "<br>/admin/bak/"; // if(is_writable("bak/")){ echo "<font color=green>OK</font>";}else{ echo "<font color=red>NO</font>";} ?> ; <br>备注:如使用在线更新补丁需程序所有目录有写权限; upload及其子目录都需要有写权限; <br>本网站不支持IE浏览器,因为IE浏览器在浪费前端开发的时间; </td> </tr> </table> </body> </html> <?php }
function stepA() { show_step(1, "开始安装", "环境以及文件目录权限检查"); $os = PHP_OS; $pv = PHP_VERSION; $up = getcon("upload_max_filesize"); $cj1 = getcon("allow_url_fopen"); echo <<<EOT <div class="main"><h2 class="title">环境检查</h2> <table class="tb" style="margin:20px 0 20px 55px;"> <tr> \t<th>项目</th> \t<th class="padleft">所需配置</th> \t<th class="padleft">最佳配置</th> \t<th class="padleft">当前服务器</th> </tr> <tr> <td>操作系统</td> <td class="padleft">不限制</td> <td class="padleft">类Unix</td> <td class="w pdleft1">{$os}</td> </tr> <tr> <td>PHP 版本</td> <td class="padleft">4.4</td> <td class="padleft">5.0</td> <td class="w pdleft1">{$pv}</td> </tr> <tr> <td>附件上传</td> <td class="padleft">不限制</td> <td class="padleft">2M</td> <td class="w pdleft1">{$up}</td> </tr> <tr> <td>远程访问</td> <td class="padleft">allow_url_fopen</td> <td class="padleft">开启</td> <td class="w pdleft1">{$cj1}</td> </tr> </table> <h2 class="title">目录、文件权限检查</h2> <table class="tb" style="margin:20px 0 20px 55px;width:90%;"> \t<tr> \t<th>目录文件</th> \t<th class="padleft">所需状态</th> \t<th class="padleft">当前状态</th> </tr> EOT; $arr = array("inc/config/config.php", "inc/config/cache.php", "inc/config/config.collect.bind.php", "inc/config/license.php", "inc/config/timmingset.xml", "inc/config/voddown.xml", "inc/config/vodplay.xml", "inc/config/vodserver.xml", "inc/config/pse_artrnd.txt", "inc/config/pse_artsyn.txt", "inc/config/pse_vodrnd.txt", "inc/config/pse_vodsyn.txt", "cache/", "cache/break/", "cache/export/", "upload/", "upload/art/", "upload/arttopic/", "upload/vod/", "upload/vodthumb/", "upload/vodtopic/", "upload/playdata/", "upload/downdata/", "js/playerconfig.js", "admin/bak/"); foreach ($arr as $f) { $st = "可写"; $cs = "w"; $status = iswriteable($f); if (!$status) { $st = "不可写"; $cs = "nw"; } echo '<tr><td>' . $f . '</td><td class="w pdleft1">可写</td><td class="' . $cs . ' pdleft1">' . $st . '</td></tr>'; } unset($arr); echo <<<EOT </table> <h2 class="title">函数依赖性检查</h2> <table class="tb" style="margin:20px 0 20px 55px;width:90%;"> <tr> \t<th>函数名称</th> \t<th class="padleft">所需状态</th> \t<th class="padleft">当前状态</th> </tr> EOT; $arr = array("mysql_connect", "curl_init", "curl_exec", "mb_convert_encoding", "dom_import_simplexml"); foreach ($arr as $f) { $st = "支持"; $cs = "w"; if (!function_exists($f)) { $st = "不支持"; $cs = "nw"; } echo '<tr><td>' . $f . '</td><td class="w pdleft1">支持</td><td class="' . $cs . ' pdleft1">' . $st . '</td></tr>'; } unset($arr); echo <<<EOT </table> </div> <form method="get" autocomplete="off" action="install.php"> <input type="hidden" name="action" value="b" /><div class="btnbox marginbot"><input type="button" onclick="history.back();" value="上一步"><input type="submit" value="下一步"> </div> </form> EOT; }
</tr> <tr> <td>最多允許使用記憶體量 (memory_limit)</td> <td><?php echo getcon("memory_limit"); ?></td> </tr> <tr> <td>POST最大位元組數 (post_max_size)</td> <td><?php echo getcon("post_max_size"); ?></td> </tr> <tr> <td>允許最大上傳檔 (upload_max_filesize)</td> <td><?php echo getcon("upload_max_filesize"); ?></td> </tr> <tr> <td>程式執行時間限制 (max_execution_time)</td> <td><?php echo getcon("max_execution_time"); ?> 秒</td> </tr> <tr> <td>magic_quotes_gpc</td> <td><?php echo (1===get_magic_quotes_gpc())?YES:NO; ?></td> </tr> <tr> <td>magic_quotes_runtime</td> <td><?php echo (1===get_magic_quotes_runtime())?YES:NO; ?></td> </tr> <tr> <td>被禁用的函數 disable_functions</td> <td><?php echo (""==($disFuns=get_cfg_var("disable_functions")))?"無":str_replace(",","<br />",$disFuns); ?></td> </tr> <tr>
function stepA() { show_step(1, "开始安装", "环境以及文件目录权限检查"); $os = PHP_OS; $pv = PHP_VERSION; $up = getcon("upload_max_filesize"); $cj1 = getcon("allow_url_fopen"); echo <<<EOT <div class="main"><h2 class="title">环境检查</h2> <table class="tb" style="margin:20px 0 20px 55px;"> <tr> \t<th>项目</th> \t<th class="padleft">所需配置</th> \t<th class="padleft">最佳配置</th> \t<th class="padleft">当前服务器</th> </tr> <tr> <td>操作系统</td> <td class="padleft">不限制</td> <td class="padleft">类Unix</td> <td class="w pdleft1">{$os}</td> </tr> <tr> <td>PHP 版本</td> <td class="padleft">4.4</td> <td class="padleft">5.0</td> <td class="w pdleft1">{$pv}</td> </tr> <tr> <td>附件上传</td> <td class="padleft">不限制</td> <td class="padleft">2M</td> <td class="w pdleft1">{$up}</td> </tr> <tr> <td>远程访问</td> <td class="padleft">allow_url_fopen</td> <td class="padleft">开启</td> <td class="w pdleft1">{$cj1}</td> </tr> </table> <h2 class="title">目录、文件权限检查</h2> <table class="tb" style="margin:20px 0 20px 55px;width:90%;"> \t<tr> \t<th>目录文件</th> \t<th class="padleft">所需状态</th> \t<th class="padleft">当前状态</th> </tr> EOT; $arr = array("inc/config.php", "inc/cache.php", "inc/timmingset.xml", "inc/vodarea.txt", "inc/vodlang.txt", "upload/", "upload/vod/", "upload/topic/", "upload/cache/", "upload/export/", "upload/thirdpartlogo/", "install/index.php", "log"); foreach ($arr as $f) { $st = "可写"; $cs = "w"; if (strpos($f, ".") > 0) { if (!is_writable(root . $f)) { $st = "不可写"; $cs = "nw"; } } else { if (!dir_writeable(root . $f)) { $st = "不可写"; $cs = "nw"; } } echo '<tr><td>' . $f . '</td><td class="w pdleft1">可写</td><td class="' . $cs . ' pdleft1">' . $st . '</td></tr>'; } unset($arr); echo <<<EOT </table> <h2 class="title">函数依赖性检查</h2> <table class="tb" style="margin:20px 0 20px 55px;width:90%;"> <tr> \t<th>函数名称</th> \t<th class="padleft">所需状态</th> \t<th class="padleft">当前状态</th> </tr> EOT; $arr = array("mysql_connect", "curl_init", "curl_exec", "mb_convert_encoding", "dom_import_simplexml"); foreach ($arr as $f) { $st = "支持"; $cs = "w"; if (!function_exists($f)) { $st = "不支持"; $cs = "nw"; } echo '<tr><td>' . $f . '</td><td class="w pdleft1">支持</td><td class="' . $cs . ' pdleft1">' . $st . '</td></tr>'; } unset($arr); echo <<<EOT </table> </div> <form method="get" autocomplete="off" action="index.php"> <input type="hidden" name="action" value="b" /> <div class="btnbox marginbot"> <input class="right btnnext" type="submit" value="下一步"> </div> </form> EOT; }