本文整理匯總了PHP中files::file_Write方法的典型用法代碼示例。如果您正苦於以下問題:PHP files::file_Write方法的具體用法?PHP files::file_Write怎麽用?PHP files::file_Write使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類files
的用法示例。
在下文中一共展示了files::file_Write方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: files
* @time 20111004
*/
//初始化
$pagetitle = '基本信息';
$pagepower = 'sys';
//基本部分
require 'checkpower.inc.php';
//功能部分
include_once WEB_INC . 'file.class.php';
include_once WEB_INC . 'string.class.php';
if (isset($submit)) {
$FS = new files();
$STR = new C_STRING();
$info = array('isclose' => $isclose, 'closeinfo' => $closeinfo, 'webtitle' => $webtitle, 'indextitle' => $indextitle, 'webkeywords' => $webkeywords, 'webdescription' => $webdescription, 'webcopyright' => $webcopyright, 'webbeian' => $webbeian, 'templates' => $systemplates);
$rs_msg = $STR->safe($info);
if ($FS->file_Write($rs_msg, WEB_INC . 'sys.inc.php', 'sys')) {
errorInfo('編輯成功');
} else {
errorInfo();
}
} else {
$rs_sys = $sys;
$templatesList = array();
function getTemplatesList()
{
global $config;
$handler = opendir(WEB_ROOT . $config['defaultTemplates']);
while (($filename = readdir($handler)) !== false) {
//務必使用!==,防止目錄下出現類似文件名“0”等情況
if ($filename != "." && $filename != "..") {
$files[] = $filename;
示例2: make_module_cache
function make_module_cache()
{
$tmp_path = WEB_MODULE;
$tmp_my_path = dir($tmp_path);
$cache_modtype = array();
$cache_modmenu = array();
$cache_modpower = array();
while ($tmp_my_file = $tmp_my_path->read()) {
if (is_dir("{$tmp_path}{$tmp_my_file}") and $tmp_my_file != "." and $tmp_my_file != "..") {
if (is_file("{$tmp_path}{$tmp_my_file}/info.install.php")) {
include "{$tmp_path}{$tmp_my_file}/info.install.php";
//$config['modtype_module']
foreach ($moduleController as $value) {
$cache_modtype['module'][] = $value;
}
//$config['modtype_module_arr']
$cache_modtype['module_arr'][$moduleName] = $moduleController;
//$config['modmenu_module']
if (isset($moduleMenu)) {
$cache_modmenu[$moduleName] = $moduleMenu;
}
//$config['modpower_module']
if (isset($modulePower)) {
$cache_modpower['module'][$moduleName] = $modulePower;
}
//$config['modpower_module_class']
if (isset($moduleClassPower)) {
$cache_modpower['module_class'][$moduleName] = $moduleClassPower;
}
unset($moduleName, $moduleController, $moduleMenu, $modulePower, $moduleClassPower);
}
}
}
if (!class_exists('files')) {
include_once WEB_INC . 'file.class.php';
}
$FS = new files();
$FS->file_Write($cache_modtype, WEB_CACHE . 'modtype.cache.php', 'cache_modtype');
$FS->file_Write($cache_modmenu, WEB_CACHE . 'modmenu.cache.php', 'cache_modmenu');
$FS->file_Write($cache_modpower, WEB_CACHE . 'modpower.cache.php', 'cache_modpower');
$tmp_my_path->close();
}