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


PHP cleanCache函数代码示例

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


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

示例1: blockall

 public function blockall()
 {
     $citys = explode(',', '北京,浙江,天津,安徽,上海,福建,莆田,重庆,江西,山东,河南,内蒙古,湖北,新疆,湖南,宁夏,广东,西藏,海南,广西,四川,河北,贵州,山西,云南,辽宁,陕西, 吉林,甘肃,黑龙江,青海,江苏,' . $_POST['city_list']);
     SetSettValue('ipblock_city', serialize($citys));
     cleanCache();
     $this->jumpUrl = U('Ipblock/index');
     $this->success('设置成功!');
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:8,代码来源:IpblockAction.class.php

示例2: nodelist

 public function nodelist()
 {
     if ($this->isPost()) {
         $access = $_POST['access'];
         SetValue('accessmode', $access);
         cleanCache();
         $this->success("修改成功!");
     }
     $this->access = GetValue('accessmode') ? GetValue('accessmode') : 'module';
     $this->display();
 }
开发者ID:anshidai,项目名称:bagsloves,代码行数:11,代码来源:NodeAction.class.php

示例3: doSortUpdate

 function doSortUpdate()
 {
     $j = 0;
     foreach ($_POST['sort'] as $k => $v) {
         if ($_POST['sort'][$k] != '') {
             if (D('Virtual_cat')->where(array('id' => $k))->data(array('sort' => $v))->save()) {
                 $j++;
             }
         }
     }
     cleanCache();
     $this->success('共修改了' . $j . '个排序!');
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:13,代码来源:VirtualcatAction.class.php

示例4: Payment

 function Payment()
 {
     $model = D('Payment');
     $this->list = $model->order('sort desc')->select();
     if ($this->isPost()) {
         $id = implode(',', (array) $_POST['id']);
         $map['id'] = array('in', $id);
         $list = $model->where($map)->getField('id,name');
         $status = $_POST['status'];
         foreach ($list as $val) {
             SetValue($val . '_status', $status);
         }
         $count = count($list);
         cleanCache();
         $this->success(($status ? '启用了' : '禁用了') . $count . '个付款方式!');
     }
     $this->display();
 }
开发者ID:anshidai,项目名称:bagsloves,代码行数:18,代码来源:SettingAction.class.php

示例5: index

 function index()
 {
     if ($this->isPost()) {
         SetSettValue('365webcall_name', rawurlencode($_POST['365webcall_name']));
         SetSettValue('365webcall_email', $_POST['365webcall_email']);
         SetSettValue('365webcall_accountid', '0594trade');
         SetSettValue('365webcall_status', $_POST['365webcall_status']);
         SetSettValue('365webcall_password', rawurlencode($_POST['365webcall_password']));
         SetSettValue('365webcall_url', $_SERVER['HTTP_HOST']);
         cleanCache();
         $this->success('操作成功!');
     } else {
         $this->name = GetSettValue('365webcall_name');
         $this->email = GetSettValue('365webcall_email');
         $this->accountid = GetSettValue('365webcall_accountid');
         $this->pwd = GetSettValue('365webcall_password');
         $this->url = GetSettValue('365webcall_url');
         $this->name2 = rawurldecode(GetSettValue('365webcall_name'));
         $this->email2 = GetSettValue('365webcall_email');
         $this->accountid2 = GetSettValue('365webcall_accountid');
         $this->pwd2 = rawurldecode(GetSettValue('365webcall_accountid'));
         $this->display();
     }
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:24,代码来源:WebcallAction.class.php

示例6: preg_replace

$new_width = preg_replace("/[^0-9]+/", '', get_request('w', 0));
$new_height = preg_replace("/[^0-9]+/", '', get_request('h', 0));
$zoom_crop = preg_replace("/[^0-9]+/", '', get_request('zc', 1));
$quality = preg_replace("/[^0-9]+/", '', get_request('q', 80));
$filters = get_request('f', '');
$sharpen = get_request('s', 0);
if ($new_width == 0 && $new_height == 0) {
    $new_width = 100;
    $new_height = 100;
}
// get mime type of src
$mime_type = mime_type($src);
// check to see if this image is in the cache already
check_cache($mime_type);
// if not in cache then clear some space and generate a new file
cleanCache();
ini_set('memory_limit', '50M');
// make sure that the src is gif/jpg/png
if (!valid_src_mime_type($mime_type)) {
    displayError('Invalid src mime type: ' . $mime_type);
}
if (strlen($src) && file_exists($src)) {
    // open the existing image
    $image = open_image($mime_type, $src);
    if ($image === false) {
        displayError('Unable to open image : ' . $src);
    }
    // Get original width and height
    $width = imagesx($image);
    $height = imagesy($image);
    // generate new w/h if not provided
开发者ID:OvayoMonti,项目名称:showofhands,代码行数:31,代码来源:timthumb.php

示例7: Update

 public function Update()
 {
     if (isset($_POST['pid'])) {
         if ($_POST['id'] == $_POST['pid']) {
             $this->error("无法更新数据!");
         }
     }
     if ($this->dao->create()) {
         $list = $this->dao->save();
         if ($list !== false) {
             $this->success('数据更新成功!');
             cleanCache();
         } else {
             $this->error("没有更新任何数据!");
         }
     } else {
         $this->error($this->dao->getError());
     }
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:19,代码来源:AdminCommAction.class.php

示例8: disableCache

            case 'disable_cache':
                if ($perform === true) {
                    echo disableCache();
                } else {
                    echo isCacheDisabled();
                }
                break;
            case 'disable_compiler':
                if ($perform === true) {
                    echo disableCompiler();
                } else {
                    echo isCompilerDisabled();
                }
                break;
            case 'clean_cache':
                echo cleanCache();
                break;
            default:
                $action = null;
                break;
        }
    } else {
        $action = null;
    }
}
function isCacheDisabled()
{
    Mage::app('admin');
    $options = Mage::getModel('core/cache')->canUse();
    foreach ($options as $option) {
        if ($option == 1) {
开发者ID:jazzmeister,项目名称:spidermagento,代码行数:31,代码来源:actions.php

示例9: cleanCache

<?php

function cleanCache($time)
{
    $files = glob(__DIR__ . "/../cache/*");
    $now = time();
    foreach ($files as $file) {
        if (is_file($file) && $now - filemtime($file) >= $time) {
            unlink($file);
        }
    }
}
cleanCache(180);
$config = parse_ini_file("../config.ini");
$page = explode("/", $_SERVER["REQUEST_URI"]);
$page = $page[count($page) - 1];
$page = $page === "" ? "about" : $page;
$page = !file_exists("templates/{$page}.html") ? "404" : $page;
$menuItems = array("about", "how to use", "pricing");
require_once "templates/header.php";
require_once "templates/{$page}.html";
require_once "templates/footer.php";
开发者ID:sysdia-solutions,项目名称:thumbify_me_website,代码行数:22,代码来源:index.php

示例10: do_movepro

 function do_movepro()
 {
     if (isset($_POST['cateid']) && $_GET['id']) {
         self::$Model = D('Products');
         $map['cateid'] = $_GET['id'];
         if (self::$Model->where($map)->count()) {
             $data['cateid'] = $_POST['cateid'];
             self::$Model->where($map)->save($data);
             cleanCache();
             $this->success('产品移动成功!');
         }
         $this->error('移动失败,该类别不存在!');
     }
     $this->error('移动失败,该类别不存在!');
 }
开发者ID:anshidai,项目名称:bagsloves,代码行数:15,代码来源:CateAction.class.php

示例11: delcate

 public function delcate($id)
 {
     $model = M('Cate');
     $promodel = M('products');
     $array["id"] = $id;
     $catecount = $model->where("pid=" . $id)->count();
     $procount = $promodel->where("cateid=" . $id)->count();
     if ($catecount < 1 && $procount < 1) {
         $count = $model->where($array)->delete();
         if ($count) {
             $res["code"] = 0;
             $res["Msg"] = '删除成功';
         } else {
             $res["code"] = 1;
             $res["Msg"] = '删除失败';
         }
     } else {
         $res["code"] = 2;
         $res["Msg"] = '该类别正在使用,删除失败';
     }
     cleanCache();
     return $res;
 }
开发者ID:anshidai,项目名称:bagsloves,代码行数:23,代码来源:CateAction.class.php

示例12: while

#!/usr/bin/php4 -q
<?php 
// Copyright 2002 - Robert Pufky
// Conversion engine for picture frame
// load configuration settings
require_once "/etc/pictureframe/config.php";
// stay running indefinity in the background
while (true) {
    // grab config.php datestamp and refresh background image
    $timestamp = filemtime("/etc/pictureframe/config.php");
    // re-render the loading screen in case of config.php changes
    `{$convert} xc:{$background} -resize {$geometry}! -fill {$textcolor} -pointsize 20 -font helvetica -gravity center -draw "text 0,0 'Loading images...'" /tmp/loading.png > /dev/null 2>&1`;
    // (re)load the originals, and clean cache of original pictures removed
    loadImages($images, $source);
    cleanCache($images);
    // go through each image and convert if necessary
    foreach ($images as $image) {
        // figure out the destination name
        $modified = $destination . "/" . $image;
        // if the image has not been converted or the converted image needs updating due to new config.php
        if (!file_exists("{$modified}") || file_exists("{$modified}") && filemtime("{$modified}") < $timestamp) {
            // assemble the full path to the files
            $original = $source . "/" . $image;
            // resize the image
            `{$convert} -interlace NONE -geometry {$geometry} "{$original}" "-" | {$composite} -gravity center "-" -compose Over /tmp/loading.png "{$modified}" > /dev/null 2>&1`;
            // if fancypants options are turned on, re-process and insert text
            if ($showtext) {
                `{$convert} "{$modified}" -font helvetica -pointsize {$textsize} -fill {$textcolor} -gravity {$textpos}{$textalign} -annotate 0 '{$image}' "{$modified}" > /dev/null 2>&1`;
            }
        }
    }
开发者ID:r-pufky,项目名称:pictureframe,代码行数:31,代码来源:convertengine.php

示例13: update

 function update($new_instance, $old_instance)
 {
     $id = 'gh.' . $old_instance['user'] . '.' . $old_instance['repo'] . '.repository';
     cleanCache($id);
     $id = 'gh.' . $old_instance['user'] . '.' . $old_instance['repo'] . '.contributors';
     cleanCache($id);
     $id = 'gh.' . $old_instance['user'] . '.' . $old_instance['repo'] . '.issues';
     cleanCache($id);
     return array('title' => strip_tags($new_instance['title']), 'user' => strip_tags($new_instance['user']), 'repo' => strip_tags($new_instance['repo']), 'desc' => strip_tags($new_instance['desc']), 'repo-add-description' => strip_tags($new_instance['repo-add-description']));
 }
开发者ID:retrofox,项目名称:wp-github-plugin,代码行数:10,代码来源:wp-github.php


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