search
HomeBackend DevelopmentPHP Tutorial想试试cakephp,将其解压到apache的htdocs目录后,访问出现strtotime调用有关问题、时区设置有关问题

想试试cakephp,将其解压到apache的htdocs目录后,访问出现strtotime调用问题、时区设置问题
下面是访问cakephp目录下的index.php浏览器给出的提示

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Warning (2): strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for '8.0/no DST' instead [CORE\cake\libs\cache.php, line 597]Code | Context$settings    =    array(    "engine" => "File",    "path" => "I:\Apache\Apache2.2\htdocs\cakephp-1.3.9-0\app\tmp\cache\persistent\",    "prefix" => "cake_core_",    "lock" => false,    "serialize" => true,    "isWindows" => true,    "duration" => "+10 seconds",    "probability" => 100)strtotime - [internal], line ??CacheEngine::init() - CORE\cake\libs\cache.php, line 597FileEngine::init() - CORE\cake\libs\cache\file.php, line 81Cache::_buildEngine() - CORE\cake\libs\cache.php, line 166Cache::config() - CORE\cake\libs\cache.php, line 141Configure::__loadBootstrap() - CORE\cake\libs\configure.php, line 421Configure::getInstance() - CORE\cake\libs\configure.php, line 52include - CORE\cake\bootstrap.php, line 38require - APP\webroot\index.php, line 76[main] - CORE\index.php, line 55Notice: Trying to get property of non-object in I:\Apache\Apache2.2\htdocs\cakephp-1.3.9-0\cake\libs\cache\file.php on line 248Fatal error: Call to a member function cd() on a non-object in I:\Apache\Apache2.2\htdocs\cakephp-1.3.9-0\cake\libs\cache\file.php on line 248



我然后看了下它所提示的源代码:

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->//cache.phpclass CacheEngine {/** * Settings of current engine instance * * @var int * @access public */    var $settings = array();/** * Initialize the cache engine * * Called automatically by the cache frontend * * @param array $params Associative array of parameters for the engine * @return boolean True if the engine has been succesfully initialized, false if not * @access public */    function init($settings = array()) {        $this->settings = array_merge(            array('prefix' => 'cake_', 'duration'=> 3600, 'probability'=> 100),            $this->settings,            $settings        );        if (!is_numeric($this->settings['duration'])) {            $this->settings['duration'] = [color=#FF0000][del]strtotime[/del]($this->settings['duration']) - time();[/color]        }        return true;    }/** * Garbage collection * * Permanently remove all expired and deleted data * * @access public */    function gc() {    }/** * Write value for a key into cache * * @param string $key Identifier for the data * @param mixed $value Data to be cached * @param mixed $duration How long to cache the data, in seconds * @return boolean True if the data was succesfully cached, false on failure * @access public */    function write($key, &$value, $duration) {        trigger_error(sprintf(__('Method write() not implemented in %s', true), get_class($this)), E_USER_ERROR);    }/** * Read a key from the cache * * @param string $key Identifier for the data * @return mixed The cached data, or false if the data doesn't exist, has expired, or if there was an error fetching it * @access public */    function read($key) {        trigger_error(sprintf(__('Method read() not implemented in %s', true), get_class($this)), E_USER_ERROR);    }/** * Increment a number under the key and return incremented value * * @param string $key Identifier for the data * @param integer $offset How much to add * @return New incremented value, false otherwise * @access public */    function increment($key, $offset = 1) {        trigger_error(sprintf(__('Method increment() not implemented in %s', true), get_class($this)), E_USER_ERROR);    }/** * Decrement a number under the key and return decremented value * * @param string $key Identifier for the data * @param integer $value How much to substract * @return New incremented value, false otherwise * @access public */    function decrement($key, $offset = 1) {        trigger_error(sprintf(__('Method decrement() not implemented in %s', true), get_class($this)), E_USER_ERROR);    }/** * Delete a key from the cache * * @param string $key Identifier for the data * @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed * @access public */    function delete($key) {    }/** * Delete all keys from the cache * * @param boolean $check if true will check expiration, otherwise delete all * @return boolean True if the cache was succesfully cleared, false otherwise * @access public */    function clear($check) {    }/** * Cache Engine settings * * @return array settings * @access public */    function settings() {        return $this->settings;    }/** * Generates a safe key for use with cache engine storage engines. * * @param string $key the key passed over * @return mixed string $key or false * @access public */    function key($key) {        if (empty($key)) {            return false;        }        $key = Inflector::underscore(str_replace(array(DS, '/', '.'), '_', strval($key)));        return $key;    }}<div class="clear">
                 
              
              
        
            </div>
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
SQL中的identity属性是什么意思?SQL中的identity属性是什么意思?Feb 19, 2024 am 11:24 AM

SQL中的Identity是什么,需要具体代码示例在SQL中,Identity是一种用于生成自增数字的特殊数据类型,它常用于唯一标识表中的每一行数据。Identity列通常与主键列配合使用,可以确保每条记录都有一个独一无二的标识符。本文将详细介绍Identity的使用方式以及一些实际的代码示例。Identity的基本使用方式在创建表时,可以使用Identit

SpringBoot怎么监听redis Key变化事件SpringBoot怎么监听redis Key变化事件May 26, 2023 pm 01:55 PM

一、功能概览键空间通知使得客户端可以通过订阅频道或模式,来接收那些以某种方式改动了Rediskey变化的事件。所有修改key键的命令。所有接收到LPUSHkeyvalue[value&hellip;]命令的键。db数据库中所有已过期的键。事件通过Redis的订阅与发布功能(pub/sub)来进行分发,因此所有支持订阅与发布功能的客户端都可以在无须做任何修改的情况下,直接使用键空间通知功能。因为Redis目前的订阅与发布功能采取的是发送即忘(fireandforget)策略,所以如果你的程

2 个月不见,人形机器人 Walker S 会叠衣服了2 个月不见,人形机器人 Walker S 会叠衣服了Apr 03, 2024 am 08:01 AM

机器之能报道编辑:吴昕国内版的人形机器人+大模型组队,首次完成叠衣服这类复杂柔性材料的操作任务。随着融合了OpenAI多模态大模型的Figure01揭开神秘面纱,国内同行的相关进展一直备受关注。就在昨天,国内"人形机器人第一股"优必选发布了人形机器人WalkerS深入融合百度文心大模型后的首个Demo,展示了一些有趣的新功能。现在,得到百度文心大模型能力加持的WalkerS是这个样子的。和Figure01一样,WalkerS没有走动,而是站在桌子后面完成一系列任务。它可以听从人类的命令,折叠衣物

入职后,我才明白什么叫Cache入职后,我才明白什么叫CacheJul 31, 2023 pm 04:03 PM

事情其实是这样的,当时领导交给我一个perf硬件性能监视的任务,在使用perf的过程中,输入命令perf list,我看到了以下信息:我的任务就要让这些cache事件能够正常计数,但关键是,我根本不知道这些misses、loads是什么意思。

Unpatchable Yubico two-factor authentication key vulnerability breaks the security of most Yubikey 5, Security Key, and YubiHSM 2FA devicesUnpatchable Yubico two-factor authentication key vulnerability breaks the security of most Yubikey 5, Security Key, and YubiHSM 2FA devicesSep 04, 2024 pm 06:32 PM

An unpatchable Yubico two-factor authentication key vulnerability has broken the security of most Yubikey 5, Security Key, and YubiHSM 2FA devices. The Feitian A22 JavaCard and other devices using Infineon SLB96xx series TPMs are also vulnerable.All

redis批量删除key值的问题怎么解决redis批量删除key值的问题怎么解决May 31, 2023 am 08:59 AM

遇到的问题:在开发过程中,会遇到要批量删除某种规则的key,例如login_logID(ID为变量),现在需要删除"login_log*"这一类的数据,但是redis本身只有批量查询一类key值的命令keys,但是没有批量删除某一个类的命令。解决办法:先查询,在删除,使用xargs传参(xargs可以将管道或标准输入(stdin)数据转换成命令行参数),先执行查询语句,在将查询出来的key值,当初del的参数去删除。redis-cliKEYSkey*(查找条件)|xargsr

使用cache可以提高计算机运行速度这是因为什么使用cache可以提高计算机运行速度这是因为什么Dec 09, 2020 am 11:28 AM

使用cache可以提高计算机运行速度这是因为Cache缩短了CPU的等待时间。Cache是位于CPU和主存储器DRAM之间,规模较小,但速度很高的存储器。Cache的功能是提高CPU数据输入输出的速率;Cache容量小但速度快,内存速度较低但容量大,通过优化调度算法,系统的性能会大大改善。

cache是什么存储器?cache是什么存储器?Nov 25, 2022 am 11:48 AM

cache叫做高速缓冲存储器,是介于中央处理器和主存储器之间的高速小容量存储器,一般由高速SRAM构成;这种局部存储器是面向CPU的,引入它是为减小或消除CPU与内存之间的速度差异对系统性能带来的影响。Cache容量小但速度快,内存速度较低但容量大,通过优化调度算法,系统的性能会大大改善。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software