• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getErrorRes函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getErrorRes函数的典型用法代码示例。如果您正苦于以下问题:PHP getErrorRes函数的具体用法?PHP getErrorRes怎么用?PHP getErrorRes使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: verifyPath

function verifyPath($path)
{
    if (!checkPath($path)) {
        echo getErrorRes("Access to {$path} is denied") . ' ' . $path;
        exit;
    }
}
开发者ID:famry,项目名称:fameCMSv2,代码行数:7,代码来源:functions.inc.php


示例2: octdec

                $errors[] = $filename;
            }
            if (is_file($filePath)) {
                @chmod($filePath, octdec(FILEPERMISSIONS));
            }
            if (RoxyFile::IsImage($filename) && (intval(MAX_IMAGE_WIDTH) > 0 || intval(MAX_IMAGE_HEIGHT) > 0)) {
                RoxyImage::Resize($filePath, $filePath, intval(MAX_IMAGE_WIDTH), intval(MAX_IMAGE_HEIGHT));
            }
        }
        if ($errors && $errorsExt) {
            $res = getSuccessRes(t('E_UploadNotAll') . ' ' . t('E_FileExtensionForbidden'));
        } elseif ($errorsExt) {
            $res = getSuccessRes(t('E_FileExtensionForbidden'));
        } elseif ($errors) {
            $res = getSuccessRes(t('E_UploadNotAll'));
        } else {
            $res = getSuccessRes();
        }
    } else {
        $res = getErrorRes(t('E_UploadNoFiles'));
    }
} else {
    $res = getErrorRes(t('E_UploadInvalidPath'));
}
?>
<script>
parent.fileUploaded(<?php 
echo $res;
?>
);
</script>
开发者ID:fzlrhmn,项目名称:sanitasi-salatiga,代码行数:31,代码来源:upload.php


示例3: liubo

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.

  Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('MOVEDIR');
checkAccess('MOVEDIR');
$path = trim(empty($_GET['d']) ? '' : $_GET['d']);
$newPath = trim(empty($_GET['n']) ? '' : $_GET['n']);
verifyPath($path);
verifyPath($newPath);
if (is_dir(fixPath($path))) {
    if (mb_strpos($newPath, $path) === 0) {
        echo getErrorRes(t('E_CannotMoveDirToChild'));
    } elseif (file_exists(fixPath($newPath) . '/' . basename($path))) {
        echo getErrorRes(t('E_DirAlreadyExists'));
    } elseif (rename(fixPath($path), fixPath($newPath) . '/' . basename($path))) {
        echo getSuccessRes();
    } else {
        echo getErrorRes(t('E_MoveDir') . ' ' . basename($path));
    }
} else {
    echo getErrorRes(t('E_MoveDirInvalisPath'));
}
开发者ID:fzlrhmn,项目名称:sanitasi-salatiga,代码行数:31,代码来源:movedir.php


示例4: liubo

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.

  Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('COPYFILE');
checkAccess('COPYFILE');
$path = trim(empty($_POST['f']) ? '' : $_POST['f']);
$newPath = trim(empty($_POST['n']) ? '' : $_POST['n']);
if (!$newPath) {
    $newPath = getFilesPath();
}
verifyPath($path);
verifyPath($newPath);
if (is_file(fixPath($path))) {
    $newPath = $newPath . '/' . RoxyFile::MakeUniqueFilename(fixPath($newPath), basename($path));
    if (copy(fixPath($path), fixPath($newPath))) {
        echo getSuccessRes();
    } else {
        echo getErrorRes(t('E_CopyFile'));
    }
} else {
    echo getErrorRes(t('E_CopyFileInvalisPath'));
}
开发者ID:e2e4gu,项目名称:cakeadmin-lightstrap,代码行数:31,代码来源:copyfile.php


示例5: verifyAction

verifyAction('COPYDIR');
checkAccess('COPYDIR');
$path = trim(empty($_GET['d']) ? '' : $_GET['d']);
$newPath = trim(empty($_GET['n']) ? '' : $_GET['n']);
verifyPath($path);
verifyPath($newPath);
function copyDir($path, $newPath)
{
    $items = listDirectory($path);
    if (!is_dir($newPath)) {
        mkdir($newPath, octdec(DIRPERMISSIONS));
    }
    foreach ($items as $item) {
        if ($item == '.' || $item == '..') {
            continue;
        }
        $oldPath = RoxyFile::FixPath($path . '/' . $item);
        $tmpNewPath = RoxyFile::FixPath($newPath . '/' . $item);
        if (is_file($oldPath)) {
            copy($oldPath, $tmpNewPath);
        } elseif (is_dir($oldPath)) {
            copyDir($oldPath, $tmpNewPath);
        }
    }
}
if (is_dir(fixPath($path))) {
    copyDir(fixPath($path . '/'), fixPath($newPath . '/' . basename($path)));
    echo getSuccessRes();
} else {
    echo getErrorRes(t('E_CopyDirInvalidPath'));
}
开发者ID:fzlrhmn,项目名称:sanitasi-salatiga,代码行数:31,代码来源:copydir.php


示例6: liubo

  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.

  Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('MOVEFILE');
checkAccess('MOVEFILE');
$path = trim(empty($_GET['f']) ? '' : $_GET['f']);
$newPath = trim(empty($_GET['n']) ? '' : $_GET['n']);
if (!$newPath) {
    $newPath = getFilesPath();
}
verifyPath($path);
verifyPath($newPath);
if (is_file(fixPath($path))) {
    if (file_exists(fixPath($newPath))) {
        echo getErrorRes(t('E_MoveFileAlreadyExists') . ' ' . basename($newPath));
    } elseif (rename(fixPath($path), fixPath($newPath))) {
        echo getSuccessRes();
    } else {
        echo getErrorRes(t('E_MoveFile') . ' ' . basename($path));
    }
} else {
    echo getErrorRes(t('E_MoveFileInvalisPath'));
}
开发者ID:famry,项目名称:fameCMSv2,代码行数:31,代码来源:movefile.php


示例7: liubo

  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.

  Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('RENAMEDIR');
checkAccess('RENAMEDIR');
$path = trim(empty($_POST['d']) ? '' : $_POST['d']);
$name = trim(empty($_POST['n']) ? '' : $_POST['n']);
verifyPath($path);
if (is_dir(fixPath($path))) {
    if (fixPath($path . '/') == fixPath(getFilesPath() . '/')) {
        echo getErrorRes(t('E_CannotRenameRoot'));
    } elseif (rename(fixPath($path), dirname(fixPath($path)) . '/' . $name)) {
        echo getSuccessRes();
    } else {
        echo getErrorRes(t('E_RenameDir') . ' ' . basename($path));
    }
} else {
    echo getErrorRes(t('E_RenameDirInvalidPath'));
}
开发者ID:keremcankaya0,项目名称:CakeBlog,代码行数:31,代码来源:renamedir.php


示例8: liubo

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.

  Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('CREATEDIR');
checkAccess('CREATEDIR');
$path = trim(empty($_GET['d']) ? '' : $_GET['d']);
$name = trim(empty($_GET['n']) ? '' : $_GET['n']);
verifyPath($path);
if (is_dir(fixPath($path))) {
    if (mkdir(fixPath($path) . '/' . $name, octdec(DIRPERMISSIONS))) {
        echo getSuccessRes();
    } else {
        echo getErrorRes(t('E_CreateDirFailed') . ' ' . basename($path));
    }
} else {
    echo getErrorRes(t('E_CreateDirInvalidPath'));
}
开发者ID:famry,项目名称:fameCMSv2,代码行数:30,代码来源:createdir.php


示例9: liubo

  the Free Software Foundation, either version 3 of the License.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.

  Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('DELETEDIR');
checkAccess('DELETEDIR');
$path = trim(empty($_GET['d']) ? '' : $_GET['d']);
verifyPath($path);
if (is_dir(fixPath($path))) {
    if (fixPath($path . '/') == fixPath(getFilesPath() . '/')) {
        echo getErrorRes(t('E_CannotDeleteRoot'));
    } elseif (count(glob(fixPath($path) . "/*"))) {
        echo getErrorRes(t('E_DeleteNonEmpty'));
    } elseif (rmdir(fixPath($path))) {
        echo getSuccessRes();
    } else {
        echo getErrorRes(t('E_CannotDeleteDir') . ' ' . basename($path));
    }
} else {
    echo getErrorRes(t('E_DeleteDirInvalidPath') . ' ' . $path);
}
开发者ID:createitro,项目名称:hartafreeex,代码行数:31,代码来源:deletedir.php


示例10: liubo

  For licensing, see LICENSE.txt or http://RoxyFileman.com/license

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.

  Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('DELETEFILE');
checkAccess('DELETEFILE');
$path = trim($_GET['f']);
verifyPath($path);
if (is_file(fixPath($path))) {
    if (unlink(fixPath($path))) {
        echo getSuccessRes();
    } else {
        echo getErrorRes(t('E_DeletеFile') . ' ' . basename($path));
    }
} else {
    echo getErrorRes(t('E_DeleteFileInvalidPath'));
}
开发者ID:fzlrhmn,项目名称:sanitasi-salatiga,代码行数:31,代码来源:deletefile.php


示例11: intval

            }
            if ($isUploaded && RoxyFile::IsImage($filename) && (intval(MAX_IMAGE_WIDTH) > 0 || intval(MAX_IMAGE_HEIGHT) > 0)) {
                RoxyImage::Resize($filePath, $filePath, intval(MAX_IMAGE_WIDTH), intval(MAX_IMAGE_HEIGHT));
            }
        }
        if ($errors && $errorsExt) {
            $res = getSuccessRes(t('E_UploadNotAll') . ' ' . t('E_FileExtensionForbidden'));
        } elseif ($errorsExt) {
            $res = getSuccessRes(t('E_FileExtensionForbidden'));
        } elseif ($errors) {
            $res = getSuccessRes(t('E_UploadNotAll'));
        } else {
            $res = getSuccessRes();
        }
    } else {
        $res = getErrorRes(t('E_UploadNoFiles'));
    }
} else {
    $res = getErrorRes(t('E_UploadInvalidPath'));
}
if ($isAjax) {
    if ($errors || $errorsExt) {
        $res = getErrorRes(t('E_UploadNotAll'));
    }
    echo $res;
} else {
    echo '
<script>
parent.fileUploaded(' . $res . ');
</script>';
}
开发者ID:keremcankaya0,项目名称:CakeBlog,代码行数:31,代码来源:upload.php


示例12: liubo

  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.

  Contact: Lyubomir Arsov, liubo (at) web-lobby.com
*/
include '../system.inc.php';
include 'functions.inc.php';
verifyAction('RENAMEFILE');
checkAccess('RENAMEFILE');
$path = trim(empty($_GET['f']) ? '' : $_GET['f']);
$name = trim(empty($_GET['n']) ? '' : $_GET['n']);
verifyPath($path);
if (is_file(fixPath($path))) {
    if (!RoxyFile::CanUploadFile($name)) {
        echo getErrorRes(t('E_FileExtensionForbidden') . ' ".' . RoxyFile::GetExtension($name) . '"');
    } elseif (rename(fixPath($path), dirname(fixPath($path)) . '/' . $name)) {
        echo getSuccessRes();
    } else {
        echo getErrorRes(t('E_RenameFile') . ' ' . basename($path));
    }
} else {
    echo getErrorRes(t('E_RenameFileInvalidPath'));
}
开发者ID:famry,项目名称:fameCMSv2,代码行数:31,代码来源:renamefile.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getErrorResponse函数代码示例发布时间:2022-05-15
下一篇:
PHP getErrorMessage函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap