本文整理汇总了PHP中S::escapeDir方法的典型用法代码示例。如果您正苦于以下问题:PHP S::escapeDir方法的具体用法?PHP S::escapeDir怎么用?PHP S::escapeDir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类S
的用法示例。
在下文中一共展示了S::escapeDir方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
foreach ($db_sellset['type'] as $key => $value) {
$selltype .= "<option value=\"{$value}\">" . $credit->cType[$value] . "</option>";
$sellCredit[$value] = $credit->cType[$value];
}
if (is_array($db_enhideset['type'])) {
foreach ($db_enhideset['type'] as $key => $value) {
$enhidetype .= "<option value=\"{$value}\">" . $credit->cType[$value] . "</option>";
$enhideCredit[$value] = $credit->cType[$value];
}
}
list($sellCredit, $enhideCredit) = array(pwJsonEncode($sellCredit), pwJsonEncode($enhideCredit));
require_once R_P . 'require/showimg.php';
list($postFaceUrl) = showfacedesign($winddb['icon'], 1, 'm');
$icondb = array();
if ($db_threademotion) {
$emotion = @opendir(S::escapeDir("{$imgdir}/post/emotion"));
while (($emotionimg = @readdir($emotion)) !== false) {
if ($emotionimg != "." && $emotionimg != ".." && $emotionimg != "" && preg_match("/^(\\d+)\\.(gif|jpg|png|bmp)\$/i", $emotionimg, $emotionMatch)) {
$icondb[$emotionMatch[1]] = $emotionimg;
}
}
ksort($icondb);
@closedir($emotion);
}
//multiple post types
if ($foruminfo['allowtype'] && ($foruminfo['allowtype'] & 1 || $foruminfo['allowtype'] & 2 && $_G['allownewvote'] || $foruminfo['allowtype'] & 4 && $_G['allowactive'] || $foruminfo['allowtype'] & 8 && $_G['allowreward'] || $foruminfo['allowtype'] & 16 || $foruminfo['allowtype'] & 32 && $_G['allowdebate'])) {
$N_allowtypeopen = true;
} else {
$N_allowtypeopen = false;
}
} else {
示例2: pwDirCv
/**
* 过滤目录路径危险字符
*
* @param string $dir 目录路径
* @return string
*/
function pwDirCv($dir)
{
return S::escapeDir($dir);
}
示例3: pwFtpClose
pwFtpClose($ftp);
$userService->update($winduid, array('icon' => $usericon));
initJob($winduid, 'doUpdateAvatar');
$jobService = L::loadclass('job', 'job');
$jobs = $jobService->getJobByJobName('doUpdateAvatar');
foreach ($jobs as $value) {
if (isset($value['isuserguide']) && !$value['isuserguide']) {
continue;
}
$job['id'] = $value['id'];
}
$jobService->jobGainController($winduid, $job['id']);
ObHeader("{$db_registerfile}?step=finish&option=2&verify={$verifyhash}");
}
//系统头像
$img = @opendir(S::escapeDir("{$imgdir}/face"));
while ($imgname = @readdir($img)) {
if ($imgname != "." && $imgname != ".." && $imgname != "" && eregi("\\.(gif|jpg|png|bmp)\$", $imgname)) {
$num++;
if ($num <= 10) {
$imgname_array[] = $imgname;
} else {
break;
}
}
}
@closedir($img);
//flash头像上传参数
$icon_encode_url = '';
list($db_ifupload, $db_imgheight, $db_imgwidth, $db_imgsize) = explode("\t", $GLOBALS['db_upload']);
if ($db_ifupload && $_G['upload']) {
示例4: mkdir
function mkdir($dir)
{
$dir = explode('/', S::escapeDir($dir));
$dirs = '';
$result = false;
$base777 = base_convert(0777, 10, 8);
for ($i = 0, $count = count($dir); $i < $count; $i++) {
if (strpos($dir[$i], '.') === 0) {
continue;
}
$result = $this->sendcmd('MKD', $dir[$i]);
$this->sendcmd('SITE CHMOD', "{$base777} {$dir[$i]}");
$this->chdir($this->rootpath . $dirs . $dir[$i]);
$dirs .= "{$dir[$i]}/";
}
$this->chdir($this->rootpath);
return $result;
}