当前位置: 首页>>代码示例>>PHP>>正文


PHP S::escapePath方法代码示例

本文整理汇总了PHP中S::escapePath方法的典型用法代码示例。如果您正苦于以下问题:PHP S::escapePath方法的具体用法?PHP S::escapePath怎么用?PHP S::escapePath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在S的用法示例。


在下文中一共展示了S::escapePath方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: aliasStatic

function aliasStatic($alias)
{
    $file = S::escapePath(AREA_PATH . $alias . '/index.html');
    $output = cookTemplate();
    pwCache::writeover($file, $output);
    ob_clean();
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:7,代码来源:core.php

示例2: _getHtmlFile

 /**
  * 获取扩展搜索的HTML模板路径
  * @param $direcotry 扩展服务的目录,正常当前为 dirname(__FILE__)或其它自定义目录
  * @param $htmlname  扩展搜索服务HTML模板名称
  */
 function _getHtmlFile($direcotry, $htmlname)
 {
     $filePath = S::escapePath($direcotry . '/template/' . $htmlname);
     if (!is_file($filePath)) {
         return '';
     }
     return $filePath;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:13,代码来源:extendabstract.class.php

示例3: getThemeConfigFile

 function getThemeConfigFile($theme)
 {
     $filedir = S::escapePath($this->config['dir'] . '/' . $theme . '/' . $this->config['configfile']);
     if (file_exists($filedir)) {
         return $filedir;
     }
     return false;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:8,代码来源:themeconfig.class.php

示例4: setAudioPath

 /**
  * 设置语音文件路径
  * @param $audioPath	路径
  * @return bool			true-成功, false-失败
  */
 function setAudioPath($audioPath)
 {
     if (empty($audioPath)) {
         return false;
     }
     $this->_audioPath = S::escapePath($audioPath);
     return true;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:13,代码来源:audio.class.php

示例5: init

 function init($db_modes, $group = array(), $system = array())
 {
     foreach ($db_modes as $key => $value) {
         $levelFile = S::escapePath(R_P . 'mode/' . $key . '/config/level.php');
         if (!file_exists($levelFile)) {
             continue;
         }
         $level = (include $levelFile);
         $this->_cookLevel($key, $level, $group, $system);
     }
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:11,代码来源:levelhook.class.php

示例6: _presetErrorMessage

 /**
  * 设置$errorMessage初始值
  * @param array $errorMessage
  * @access protected
  * @return bool|FieldCheck 遇错返回false
  */
 function _presetErrorMessage()
 {
     require_once S::escapePath(GetLang('fielderror'));
     $errorMessage = $lang['fielderror'];
     if ($errorMessage) {
         $this->_setErrorMessage($errorMessage);
         return $this;
     } else {
         return false;
     }
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:17,代码来源:activityfieldcheck.class.php

示例7: findByTypeId

 function findByTypeId($typeId)
 {
     $data = array();
     if (file_exists($this->_getCacheKey())) {
         include S::escapePath($this->_getCacheKey());
     } else {
         $data = $this->findByTypeIdWithoutCache($typeId);
         pwCache::setData($this->_getCacheKey(), '<?php $data = ' . var_export($data, true) . ';');
     }
     return $data;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:11,代码来源:smiledb.class.php

示例8: getDelfileFactory

function getDelfileFactory($type)
{
    if ($type == 'active') {
        return new activeMutiDelfile();
    }
    if ($type && file_exists(R_P . "require/extents/attach/{$type}MutiDelfile.class.php")) {
        $class = $type . 'MutiDelfile';
        require_once S::escapePath(R_P . "require/extents/attach/{$type}MutiDelfile.class.php");
        return new $class();
    }
    return new threadMutiDelfile();
}
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:12,代码来源:delmutiattone.php

示例9: getLayoutString

 /**
  * 获取布局html
  * 
  * @param string $layout 布局名
  * @return string
  */
 function getLayoutString($layout)
 {
     if (!isset($this->layoutStrings[$layout])) {
         if ($layout && file_exists(S::escapePath(A_P . 'data/layout/' . $layout . '/layout.htm'))) {
             //* $this->layoutStrings[$layout] = readover(S::escapePath(A_P.'data/layout/'.$layout.'/layout.htm'));
             $this->layoutStrings[$layout] = pwCache::readover(S::escapePath(A_P . 'data/layout/' . $layout . '/layout.htm'));
         } else {
             $this->layoutStrings[$layout] = '';
         }
     }
     return $this->layoutStrings[$layout];
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:18,代码来源:parsestopictpl.class.php

示例10: FileArray

function FileArray($hackdir, $base = 'hack')
{
    if (!in_array($base, array('hack', 'mode'))) {
        $base = 'hack';
    }
    if (function_exists('file_get_contents')) {
        $filedata = @file_get_contents(S::escapePath(R_P . "{$base}/{$hackdir}/sql.txt"));
    } else {
        $filedata = readover(R_P . "{$base}/{$hackdir}/sql.txt");
    }
    $filedata = preg_replace("/;(\r\n|\n)/is", ";[pw]", $filedata);
    $filedata = trim(str_replace(array("\t", "\r", "\n"), array('', '', ''), $filedata));
    $sqlarray = $filedata ? explode("[pw]", $filedata) : array();
    return $sqlarray;
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:15,代码来源:sql_deal.php

示例11: initRight

 function initRight()
 {
     global $gp_gptype, $SYSTEM;
     if (!is_null($this->_G)) {
         return;
     }
     if ($this->groupid == 'guest') {
         require D_P . 'data/groupdb/group_2.php';
     } elseif (file_exists(D_P . "data/groupdb/group_{$this->groupid}.php")) {
         require S::escapePath(D_P . "data/groupdb/group_{$this->groupid}.php");
     } else {
         require D_P . 'data/groupdb/group_1.php';
     }
     $this->_G = $_G;
     $this->_SYSTEM = $SYSTEM;
     $this->_gp_gptype = $gp_gptype;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:17,代码来源:ver.customized.user.module.php

示例12: sendMessage

 /**
  * 以某个用户的身份给另一个用户发送短消息
  * @param int $userId 发送者uid
  * @param string $receiver 接受者用户名
  * @param string $subject 标题
  * @param string $content 内容
  * return bool
  */
 function sendMessage($userId, $receiver, $subject, $content)
 {
     global $winddb, $winduid, $windid, $groupid, $_G, $SYSTEM;
     $userService = $this->_getUserService();
     $winddb = $userService->get($userId, true, true);
     $winduid = $winddb['uid'];
     $groupid = $winddb['groupid'];
     $windid = $winddb['username'];
     $groupid == '-1' && ($groupid = $winddb['memberid']);
     if (file_exists(D_P . "data/groupdb/group_{$groupid}.php")) {
         extract(pwCache::getData(S::escapePath(D_P . "data/groupdb/group_{$groupid}.php", false)));
     } else {
         extract(pwCache::getData(D_P . 'data/groupdb/group_1.php', false));
     }
     M::sendMessage($userId, array($receiver), array('create_uid' => $winduid, 'create_username' => $windid, 'title' => S::escapeChar(stripslashes($subject)), 'content' => S::escapeChar(stripslashes($content))));
     return new ApiResponse(true);
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:25,代码来源:class_Msg.php

示例13: getAttModifyFactory

function getAttModifyFactory($type, $aid)
{
    if ($type == 'active') {
        L::loadClass('activeupload', 'upload', false);
        return new ActiveModify($aid);
    }
    if ($type == 'cms') {
        require_once R_P . 'mode/cms/lib/upload/articleupload.class.php';
        return new ArticleModify($aid);
    }
    if ($type && file_exists(R_P . "require/extents/attach/{$type}modify.class.php")) {
        $class = $type . 'Modify';
        require_once S::escapePath(R_P . "require/extents/attach/{$type}modify.class.php");
        return new $class($aid);
    }
    L::loadClass('AttModify', 'upload', false);
    return new AttModify($aid);
}
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:18,代码来源:modifyattach.php

示例14: run

 function run($configs)
 {
     list($controller, $action, $viewerPath, $className, $actionName, $path) = $this->init($configs);
     if (!is_file($path)) {
         Error::showError("路径不存在" . $path);
     }
     require_once S::escapePath($path);
     if (!class_exists($className, true)) {
         Error::showError("类名不存在" . $className);
     }
     $obj = new $className();
     if ($action && !is_callable(array($obj, $action))) {
         Error::showError("方法名不存在" . $action);
     }
     if (in_array($action, array($className, "execute", "__construct", "init", "before", "after"))) {
         Error::showError("方法调用有误" . $className);
     }
     $obj->execute($controller, $action, $viewerPath);
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:19,代码来源:router.class.php

示例15: deleteDir

 function deleteDir($dir)
 {
     $dir = S::escapePath($dir);
     while (!rmdir($dir)) {
         if (is_dir($dir)) {
             if ($dp = opendir($dir)) {
                 while (($file = readdir($dp)) != false) {
                     if (is_dir($dir . '/' . $file) && $file != '.' && $file != '..') {
                         PW_FileOperate::deleteDir($dir . '/' . $file);
                     } else {
                         if ($file != '.' && $file != '..') {
                             P_unlink($dir . '/' . $file);
                         }
                     }
                 }
                 closedir($dp);
             } else {
                 return false;
             }
         }
     }
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:22,代码来源:fileoperate.class.php


注:本文中的S::escapePath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。