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


PHP WindFile::isFile方法代碼示例

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


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

示例1: __construct

 public function __construct()
 {
     $this->logfile = Wind::getRealPath(Wekit::app()->logFile, true);
     if (!WindFile::isFile($this->logfile)) {
         WindFile::write($this->logfile, "<?php die;?>\n");
     }
 }
開發者ID:fanqimeng,項目名稱:4tweb,代碼行數:7,代碼來源:AdminLogService.php

示例2: doCompile

 public function doCompile()
 {
     $config = Wekit::load('APPCENTER:service.srv.PwInstallApplication')->getConfig('style-type');
     foreach ($config as $k => $v) {
         $dir = Wind::getRealDir('THEMES:' . $v[1]);
         $files = WindFolder::read($dir, WindFolder::READ_DIR);
         foreach ($files as $v) {
             $manifest = $dir . '/' . $v . '/' . $this->manifest;
             if (!WindFile::isFile($manifest)) {
                 continue;
             }
             if (($r = $this->_doCss($dir . '/' . $v)) instanceof PwError) {
                 return $r;
             }
         }
     }
 }
開發者ID:latticet,項目名稱:EduSoho_jb51,代碼行數:17,代碼來源:PwCssCompress.php

示例3: getUnInstalledThemes

 /**
  * 查找未安裝的風格
  *
  * @return array 未安裝的風格名
  */
 public function getUnInstalledThemes()
 {
     $config = Wekit::load('APPCENTER:service.srv.PwInstallApplication')->getConfig('style-type');
     $themes = array();
     foreach ($config as $k => $v) {
         $dir = Wind::getRealDir('THEMES:' . $v[1]);
         $files = WindFolder::read($dir, WindFolder::READ_DIR);
         foreach ($files as $file) {
             if (WindFile::isFile($dir . '/' . $file . '/' . $this->manifest)) {
                 $themes[$k][] = $file;
             }
         }
     }
     if (empty($themes)) {
         return array();
     }
     $styles = array();
     foreach ($themes as $k => $v) {
         $r = $this->_styleDs()->fetchStyleByAliasAndType($v, $k, 'alias');
         $r = array_diff($v, array_keys($r));
         $r && ($styles[$k] = $r);
     }
     return $styles;
 }
開發者ID:chendong0444,項目名稱:phpwind,代碼行數:29,代碼來源:PwStyleService.php

示例4: getCacheArea

 protected function getCacheArea()
 {
     $file = Wind::getRealPath('DATA:area.area.php', true);
     if (WindFile::isFile($file)) {
         return include $file;
     }
     return $this->updateCache();
 }
開發者ID:YoursBoss,項目名稱:nextwind,代碼行數:8,代碼來源:WindidAreaService.php

示例5: scanAction

 public function scanAction()
 {
     $ext = Wind::getRealDir('EXT:', true);
     $dirs = WindFolder::read($ext, WindFolder::READ_DIR);
     $alias = array();
     foreach ($dirs as $file) {
         if (WindFile::isFile($ext . '/' . $file . '/Manifest.xml')) {
             $alias[] = $file;
         }
     }
     $result = $this->_appDs()->fetchByAlias($alias, 'alias');
     $to_install = array_diff($alias, array_keys($result));
     if (!$to_install) {
         $this->showMessage('success');
     }
 }
開發者ID:chendong0444,項目名稱:phpwind,代碼行數:16,代碼來源:AppController.php

示例6: doimportAction

 public function doimportAction()
 {
     Wind::import('SRV:upload.action.PwWordUpload');
     Wind::import('LIB:upload.PwUpload');
     $bhv = new PwWordUpload();
     $upload = new PwUpload($bhv);
     if (($result = $upload->check()) === true) {
         $result = $upload->execute();
     }
     if ($result !== true) {
         $error = $result->getError();
         if (is_array($error)) {
             list($error, ) = $error;
             if ($error == 'upload.ext.error') {
                 $this->showError('WORD:ext.error');
             }
         }
         $this->showError($result->getError());
     }
     $source = $bhv->getAbsoluteFile();
     if (!WindFile::isFile($source)) {
         $this->showError('operate.fail');
     }
     $content = WindFile::read($source);
     pw::deleteAttach($bhv->dir . $bhv->filename, 0, $bhv->isLocal);
     $content = explode("\n", $content);
     if (!$content) {
         $this->showError('WORD:import.data.empty');
     }
     $wordService = $this->_getWordService();
     $typeMap = $this->_getWordDS()->getTypeMap();
     Wind::import('SRV:word.dm.PwWordDm');
     foreach ($content as $value) {
         list($word, $type, $replace) = $this->_parseTextUseInImport($value, $typeMap);
         if (!$word || !$type || $wordService->isExistWord($word)) {
             continue;
         }
         $dm = new PwWordDm();
         /* @var $dm PwWordDm */
         $dm->setWord($word)->setWordType($type);
         $replace = $this->_getWordDS()->isReplaceWord($type) ? $replace ? $replace : '****' : '';
         $dm->setWordReplace($replace);
         $this->_getWordDS()->add($dm);
     }
     $this->_getWordFilter()->updateCache();
     $this->showMessage('success');
 }
開發者ID:chendong0444,項目名稱:phpwind,代碼行數:47,代碼來源:ManageController.php

示例7: clearRecur

 /**
  * 遞歸的刪除目錄
  * 
  * @param string $dir 目錄
  * @param Boolean $delFolder 是否刪除目錄
  */
 public static function clearRecur($dir, $delFolder = false)
 {
     if (!self::isDir($dir)) {
         return false;
     }
     if (!($handle = @opendir($dir))) {
         return false;
     }
     while (false !== ($file = readdir($handle))) {
         if ('.' === $file || '..' === $file) {
             continue;
         }
         $_path = $dir . '/' . $file;
         if (self::isDir($_path)) {
             self::clearRecur($_path, $delFolder);
         } elseif (WindFile::isFile($_path)) {
             WindFile::del($_path);
         }
     }
     $delFolder && @rmdir($dir);
     @closedir($handle);
     return true;
 }
開發者ID:jellycheng,項目名稱:windframework,代碼行數:29,代碼來源:WindFolder.php

示例8: replaceTitle

 /**
  * 修改主標題
  * Enter description here ...
  * @param string $name
  * @param string $repace
  */
 public function replaceTitle($name, $repace, $tpl = 'index')
 {
     if (!$tpl) {
         return false;
     }
     $file = $this->dir . $tpl . '.htm';
     if (!WindFile::isFile($file)) {
         $file = $this->commonDir . $tpl . '.htm';
     }
     $content = $this->read($file);
     if (preg_match_all('/\\<pw-title\\s*id=\\"(\\w+)\\"\\s*[>|\\/>](.+)<\\/pw-title>/isU', $content, $matches)) {
         foreach ($matches[1] as $k => $v) {
             if ($v != $name) {
                 continue;
             }
             $_html = '<pw-title id="' . $name . '">' . $repace . '</pw-list>';
             $content = str_replace($matches[0][$k], $_html, $content);
         }
     }
     $this->write($content, $file);
 }
開發者ID:fanqimeng,項目名稱:4tweb,代碼行數:27,代碼來源:PwPortalCompile.php

示例9: _checkDatabase

 /**
  * 檢查目錄
  *
  * @return array
  */
 private function _checkDatabase()
 {
     if (!WindFile::isFile($this->_getDatabaseFile()) || !WindFile::isFile($this->_getTableSqlFile())) {
         $this->showError('INSTALL:database_config_noexists');
     }
     if (!$this->_checkWriteAble($this->_getDatabaseFile())) {
         $this->showError('INSTALL:error_777_database');
     }
     if (!$this->_checkWriteAble($this->_getFounderFile())) {
         $this->showError('INSTALL:error_777_founder');
     }
     /*if (!$this->_checkWriteAble($this->_getWindidFile())) {
     			$this->showError('INSTALL:error_777_windid');
     		}*/
     $database = (include $this->_getTempFile());
     if (!$database['founder']) {
         $this->showError('INSTALL:database_config_error');
     }
     return $database;
 }
開發者ID:sanzhumu,項目名稱:nextwind,代碼行數:25,代碼來源:IndexController.php

示例10: _outFlash

 private static function _outFlash()
 {
     if (!class_exists('SWFBitmap')) {
         return false;
     }
     self::_getCodeLenth();
     self::_creatImage();
     self::_setRandBackground();
     self::_creatBackground();
     //self::_setPicBackground();
     self::_setRandFont();
     self::_setRandGraph();
     self::_writeImage();
     self::_setRandDistortion();
     $_tmpPath = Wind::getRealDir('DATA:tmp.');
     $_tmp = $_tmpPath . WindUtility::generateRandStr(8) . '.png';
     imagepng(self::$_image, $_tmp);
     if (!WindFile::isFile($_tmp)) {
         return false;
     }
     imagedestroy(self::$_image);
     $bit = new SWFBitmap($_tmp);
     $shape = new SWFShape();
     $shape->setRightFill($shape->addFill($bit));
     $shape->drawLine($bit->getWidth(), 0);
     $shape->drawLine(0, $bit->getHeight());
     $shape->drawLine(-$bit->getWidth(), 0);
     $shape->drawLine(0, -$bit->getHeight());
     $movie = new SWFMovie();
     $movie->setDimension($bit->getWidth(), $bit->getHeight());
     $flash = $movie->add($shape);
     header("Pragma:no-cache");
     header("Cache-control:no-cache");
     header('Content-type: application/x-shockwave-flash');
     $movie->output();
     WindFolder::clear($_tmpPath);
 }
開發者ID:latticet,項目名稱:EduSoho_jb51,代碼行數:37,代碼來源:PwGDCode.php


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