当前位置: 首页>>代码示例>>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;未经允许,请勿转载。