本文整理汇总了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);
}
示例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')) {
示例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) {