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

PHP tep_remove函数代码示例

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

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



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

示例1: fread

                    $buffer = fread($fp, filesize(DIR_FS_BACKUP . $HTTP_GET_VARS['file']));
                    fclose($fp);
                    header('Content-type: application/x-octet-stream');
                    header('Content-disposition: attachment; filename=' . $HTTP_GET_VARS['file']);
                    echo $buffer;
                    exit;
                }
            } else {
                $messageStack->add(ERROR_DOWNLOAD_LINK_NOT_ACCEPTABLE, 'error');
            }
            break;
        case 'deleteconfirm':
            if (strstr($HTTP_GET_VARS['file'], '..')) {
                tep_redirect(tep_href_link(FILENAME_BACKUP));
            }
            tep_remove(DIR_FS_BACKUP . '/' . $HTTP_GET_VARS['file']);
            if (!$tep_remove_error) {
                $messageStack->add_session(SUCCESS_BACKUP_DELETED, 'success');
                tep_redirect(tep_href_link(FILENAME_BACKUP));
            }
            break;
    }
}
// check if the backup directory exists
$dir_ok = false;
if (is_dir(DIR_FS_BACKUP)) {
    if (is_writeable(DIR_FS_BACKUP)) {
        $dir_ok = true;
    } else {
        $messageStack->add(ERROR_BACKUP_DIRECTORY_NOT_WRITEABLE, 'error');
    }
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:backup.php


示例2: tep_remove

function tep_remove($source)
{
    global $messageStack, $tep_remove_error;
    if (isset($tep_remove_error)) {
        $tep_remove_error = false;
    }
    if (is_dir($source)) {
        $dir = dir($source);
        while ($file = $dir->read()) {
            if ($file != '.' && $file != '..') {
                if (tep_is_writable($source . '/' . $file)) {
                    tep_remove($source . '/' . $file);
                } else {
                    $messageStack->add(sprintf(ERROR_FILE_NOT_REMOVEABLE, $source . '/' . $file), 'error');
                    $tep_remove_error = true;
                }
            }
        }
        $dir->close();
        if (tep_is_writable($source)) {
            rmdir($source);
        } else {
            $messageStack->add(sprintf(ERROR_DIRECTORY_NOT_REMOVEABLE, $source), 'error');
            $tep_remove_error = true;
        }
    } else {
        if (tep_is_writable($source)) {
            unlink($source);
        } else {
            $messageStack->add(sprintf(ERROR_FILE_NOT_REMOVEABLE, $source), 'error');
            $tep_remove_error = true;
        }
    }
}
开发者ID:tapwag,项目名称:oscommerce_deutsch,代码行数:34,代码来源:general.php


示例3: fread

                    $buffer = fread($fp, filesize(DIR_FS_BACKUP . basename($HTTP_GET_VARS['file'])));
                    fclose($fp);
                    header('Content-type: application/x-octet-stream');
                    header('Content-disposition: attachment; filename=' . basename($HTTP_GET_VARS['file']));
                    echo $buffer;
                    die;
                }
            } else {
                $messageStack->add(ERROR_DOWNLOAD_LINK_NOT_ACCEPTABLE, 'error');
            }
            break;
        case 'deleteconfirm':
            if (strstr($HTTP_GET_VARS['file'], '..')) {
                tep_redirect(tep_href_link(FILENAME_BACKUP));
            }
            tep_remove(DIR_FS_BACKUP . '/' . basename($HTTP_GET_VARS['file']));
            if (!$tep_remove_error) {
                $messageStack->add_session(SUCCESS_BACKUP_DELETED, 'success');
                tep_redirect(tep_href_link(FILENAME_BACKUP));
            }
            break;
    }
}
// check if the backup directory exists
$dir_ok = false;
if (is_dir(DIR_FS_BACKUP)) {
    if (is_writeable(DIR_FS_BACKUP)) {
        $dir_ok = true;
    } else {
        $messageStack->add(ERROR_BACKUP_DIRECTORY_NOT_WRITEABLE, 'error');
    }
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:31,代码来源:backup.php


示例4: fread

                    $buffer = fread($fp, filesize(DIR_FS_BACKUP . $_GET['file']));
                    fclose($fp);
                    header('Content-type: application/x-octet-stream');
                    header('Content-disposition: attachment; filename=' . $_GET['file']);
                    echo $buffer;
                    exit;
                }
            } else {
                $messageStack->add(ERROR_DOWNLOAD_LINK_NOT_ACCEPTABLE, 'error');
            }
            break;
        case 'deleteconfirm':
            if (strstr($_GET['file'], '..')) {
                tep_redirect(tep_href_link(FILENAME_BACKUP));
            }
            tep_remove(DIR_FS_BACKUP . '/' . $_GET['file']);
            if (!$tep_remove_error) {
                $messageStack->add_session(SUCCESS_BACKUP_DELETED, 'success');
                tep_redirect(tep_href_link(FILENAME_BACKUP));
            }
            break;
    }
}
// check if the backup directory exists
$dir_ok = false;
if (is_dir(DIR_FS_BACKUP)) {
    if (is_writeable(DIR_FS_BACKUP)) {
        $dir_ok = true;
    } else {
        $messageStack->add(ERROR_BACKUP_DIRECTORY_NOT_WRITEABLE, 'error');
    }
开发者ID:digideskio,项目名称:oscmax2,代码行数:31,代码来源:backup.php


示例5: isset

}
if (!ereg('^' . DIR_FS_DOCUMENT_ROOT, $current_path)) {
    $current_path = DIR_FS_DOCUMENT_ROOT;
}
$action = isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '';
if (tep_not_null($action)) {
    switch ($action) {
        case 'reset':
            tep_session_unregister('current_path');
            tep_redirect(tep_href_link(FILENAME_FILE_MANAGER));
            break;
        case 'deleteconfirm':
            if (strstr($HTTP_GET_VARS['info'], '..')) {
                tep_redirect(tep_href_link(FILENAME_FILE_MANAGER));
            }
            tep_remove($current_path . '/' . $HTTP_GET_VARS['info']);
            if (!$tep_remove_error) {
                tep_redirect(tep_href_link(FILENAME_FILE_MANAGER));
            }
            break;
        case 'insert':
            if (mkdir($current_path . '/' . $HTTP_POST_VARS['folder_name'], 0777)) {
                tep_redirect(tep_href_link(FILENAME_FILE_MANAGER, 'info=' . urlencode($HTTP_POST_VARS['folder_name'])));
            }
            break;
        case 'save':
            if ($fp = fopen($current_path . '/' . $HTTP_POST_VARS['filename'], 'w+')) {
                fputs($fp, stripslashes($HTTP_POST_VARS['file_contents']));
                fclose($fp);
                tep_redirect(tep_href_link(FILENAME_FILE_MANAGER, 'info=' . urlencode($HTTP_POST_VARS['filename'])));
            }
开发者ID:paraspatel2020,项目名称:cs4550-oscommerce,代码行数:31,代码来源:file_manager.php


示例6: isset

if (strpos(DIR_FS_CATALOG . 'images', $real_path) === false) {
    $current_path = 'images';
}
$real_path = DIR_FS_CATALOG . $current_path;
$action = isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '';
if (tep_not_null($action)) {
    switch ($action) {
        case 'reset':
            tep_session_unregister('current_path');
            tep_redirect(tep_href_link(FILENAME_FILE_MANAGER));
            break;
        case 'deleteconfirm':
            if (strstr($HTTP_GET_VARS['info'], '..')) {
                tep_redirect(tep_href_link(FILENAME_FILE_MANAGER));
            }
            tep_remove($real_path . '/' . $HTTP_GET_VARS['info']);
            if (!$tep_remove_error) {
                tep_redirect(tep_href_link(FILENAME_FILE_MANAGER));
            }
            break;
        case 'insert':
            if (mkdir($real_path . '/' . $HTTP_POST_VARS['folder_name'], 0777)) {
                tep_redirect(tep_href_link(FILENAME_FILE_MANAGER, 'info=' . urlencode($HTTP_POST_VARS['folder_name'])));
            }
            break;
        case 'save':
            if ($fp = fopen($real_path . '/' . $HTTP_POST_VARS['filename'], 'w+')) {
                fputs($fp, stripslashes($HTTP_POST_VARS['file_contents']));
                fclose($fp);
                tep_redirect(tep_href_link(FILENAME_FILE_MANAGER, 'info=' . urlencode($HTTP_POST_VARS['filename'])));
            }
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:31,代码来源:file_manager.php


示例7: isset

}
if (!ereg('^' . DIR_FS_DOCUMENT_ROOT, $current_path)) {
    $current_path = DIR_FS_DOCUMENT_ROOT;
}
$action = isset($_GET['action']) ? $_GET['action'] : '';
if (tep_not_null($action)) {
    switch ($action) {
        case 'reset':
            tep_session_unregister('current_path');
            tep_redirect(tep_href_link(FILENAME_FILE_MANAGER));
            break;
        case 'deleteconfirm':
            if (strstr($_GET['info'], '..')) {
                tep_redirect(tep_href_link(FILENAME_FILE_MANAGER));
            }
            tep_remove($current_path . '/' . $_GET['info']);
            if (!$tep_remove_error) {
                tep_redirect(tep_href_link(FILENAME_FILE_MANAGER));
            }
            break;
        case 'insert':
            if (mkdir($current_path . '/' . $_POST['folder_name'], 0777)) {
                tep_redirect(tep_href_link(FILENAME_FILE_MANAGER, 'info=' . urlencode($_POST['folder_name'])));
            }
            break;
        case 'save':
            if ($fp = fopen($current_path . '/' . $_POST['filename'], 'w+')) {
                fputs($fp, stripslashes($_POST['file_contents']));
                fclose($fp);
                tep_redirect(tep_href_link(FILENAME_FILE_MANAGER, 'info=' . urlencode($_POST['filename'])));
            }
开发者ID:eosc,项目名称:EosC-2.3,代码行数:31,代码来源:file_manager.php.bak.php


示例8: fread

                        $buffer = fread($fp, filesize(DIR_FS_BACKUP . basename($_GET['file'])));
                        fclose($fp);
                        header('Content-type: application/x-octet-stream');
                        header('Content-disposition: attachment; filename=' . basename($_GET['file']));
                        echo $buffer;
                        exit;
                    }
                } else {
                    $osC_MessageStack->add('header', ERROR_DOWNLOAD_LINK_NOT_ACCEPTABLE, 'error');
                }
            }
            break;
        case 'deleteconfirm':
            if (isset($_GET['file'])) {
                if (file_exists(DIR_FS_BACKUP . basename($_GET['file']))) {
                    tep_remove(DIR_FS_BACKUP . basename($_GET['file']));
                    if (!$tep_remove_error) {
                        $osC_MessageStack->add_session('header', SUCCESS_BACKUP_DELETED, 'success');
                        tep_redirect(tep_href_link(FILENAME_BACKUP));
                    }
                }
            }
            break;
    }
}
// check if the backup directory exists
$dir_ok = false;
if (is_dir(DIR_FS_BACKUP)) {
    if (is_writeable(DIR_FS_BACKUP)) {
        $dir_ok = true;
    } else {
开发者ID:itnovator,项目名称:oscommerce_cvs,代码行数:31,代码来源:backup.php


示例9: isset

if (substr($current_path, 0, strlen(OSC_ADMIN_FILE_MANAGER_ROOT_PATH)) != OSC_ADMIN_FILE_MANAGER_ROOT_PATH || is_dir($current_path) === false) {
    $current_path = OSC_ADMIN_FILE_MANAGER_ROOT_PATH;
    $osC_Session->set('fm_directory', $current_path);
}
$action = isset($_GET['action']) ? $_GET['action'] : '';
if (!empty($action)) {
    switch ($action) {
        case 'reset':
            $osC_Session->remove('fm_directory');
            tep_redirect(tep_href_link(FILENAME_FILE_MANAGER));
            break;
        case 'deleteconfirm':
            if (isset($_GET['entry']) && !empty($_GET['entry'])) {
                $target = $current_path . '/' . basename($_GET['entry']);
                if (is_writeable($target)) {
                    tep_remove($target);
                } else {
                    if (is_file($target)) {
                        $osC_MessageStack->add_session('header', sprintf(ERROR_FILE_NOT_WRITEABLE, $target), 'error');
                    } else {
                        $osC_MessageStack->add_session('header', sprintf(ERROR_DIRECTORY_NOT_WRITEABLE, $target), 'error');
                    }
                }
            }
            tep_redirect(tep_href_link(FILENAME_FILE_MANAGER));
            break;
        case 'new_directory':
            if (isset($_POST['directory_name']) && !empty($_POST['directory_name'])) {
                if (is_writeable($current_path)) {
                    $new_directory = $current_path . '/' . basename($_POST['directory_name']);
                    if (file_exists($new_directory) === false) {
开发者ID:itnovator,项目名称:oscommerce_cvs,代码行数:31,代码来源:file_manager.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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