當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Website::fileExists方法代碼示例

本文整理匯總了PHP中Website::fileExists方法的典型用法代碼示例。如果您正苦於以下問題:PHP Website::fileExists方法的具體用法?PHP Website::fileExists怎麽用?PHP Website::fileExists使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Website的用法示例。


在下文中一共展示了Website::fileExists方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: fileExists

 public function fileExists($path)
 {
     return Website::fileExists($path);
 }
開發者ID:aottibia,項目名稱:www,代碼行數:4,代碼來源:configlua.php

示例2: elseif

	<b>IF NOT INSTALLED:</b><br>
	<a href="install.php?page=step&step=start" target="step">0. Informations</a><br>
	<a href="install.php?page=step&step=1" target="step">1. Set server path</a><br>
	<a href="install.php?page=step&step=2" target="step">2. Check DataBase connection</a><br>
	<a href="install.php?page=step&step=3" target="step">3. Add tables and columns to DB</a><br>
	<a href="install.php?page=step&step=4" target="step">4. Add samples to DB</a><br>
	<a href="install.php?page=step&step=5" target="step">5. Set Admin Account</a><br>
	<b>Author:</b><br>
	Gesior<br>
	Compatible with TFS 0.3.6 and TFS 0.4 up to revision 3702</a>';
} elseif ($page == 'step') {
    if ($step >= 2 && $step <= 5) {
        //load server config $config['server']
        if (Website::getWebsiteConfig()->getValue('useServerConfigCache')) {
            // use cache to make website load faster
            if (Website::fileExists('./config/server.config.php')) {
                $tmp_php_config = new ConfigPHP('./config/server.config.php');
                $config['server'] = $tmp_php_config->getConfig();
            } else {
                // if file isn't cache we should load .lua file and make .php cache
                $tmp_lua_config = new ConfigLUA(Website::getWebsiteConfig()->getValue('serverPath') . 'config.lua');
                $config['server'] = $tmp_lua_config->getConfig();
                $tmp_php_config = new ConfigPHP();
                $tmp_php_config->setConfig($tmp_lua_config->getConfig());
                $tmp_php_config->saveToFile('./config/server.config.php');
            }
        } else {
            $tmp_lua_config = new ConfigLUA(Website::getWebsiteConfig()->getValue('serverPath') . 'config.lua');
            $config['server'] = $tmp_lua_config->getConfig();
        }
        if (Website::getServerConfig()->isSetKey('mysqlHost')) {
開發者ID:s3kk,項目名稱:Gesior1.x,代碼行數:31,代碼來源:install.php

示例3: htmlspecialchars

<?php

if (!defined('INITIALIZED')) {
    exit;
}
// DEFINE VARIABLES FOR SCRIPTS AND LAYOUTS (no more notices 'undefinied variable'!)
if (!isset($_REQUEST['subtopic']) || empty($_REQUEST['subtopic']) || is_array($_REQUEST['subtopic'])) {
    $_REQUEST['subtopic'] = "latestnews";
} else {
    $_REQUEST['subtopic'] = (string) $_REQUEST['subtopic'];
}
if (Functions::isValidFolderName($_REQUEST['subtopic'])) {
    if (Website::fileExists("pages/" . $_REQUEST['subtopic'] . ".php")) {
        $subtopic = $_REQUEST['subtopic'];
    } else {
        new Error_Critic('CRITICAL ERROR', 'Cannot load page <b>' . htmlspecialchars($_REQUEST['subtopic']) . '</b>, file does not exist.');
    }
} else {
    new Error_Critic('CRITICAL ERROR', 'Cannot load page <b>' . htmlspecialchars($_REQUEST['subtopic']) . '</b>, invalid file name [contains illegal characters].');
}
// action that page should execute
if (isset($_REQUEST['action'])) {
    $action = (string) $_REQUEST['action'];
} else {
    $action = '';
}
$logged = false;
$account_logged = new Account();
$group_id_of_acc_logged = 0;
// with ONLY_PAGE option we want disable useless SQL queries
if (!ONLY_PAGE) {
開發者ID:Pietia10,項目名稱:Gesior-for-OTServ,代碼行數:31,代碼來源:load.compat.php


注:本文中的Website::fileExists方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。