在通过IE的后退按钮或者网页中的history.go(-1)时,我们看到的将是缓存页,但使用了session_start后,这个函数会强制当前页面不被缓存,导致出现“警告: 网页已经过期”。
php设置时区方法详解介绍
在php中我们要设置时间的方法有很多种,最常用的就是直接在php.ini中进行修改了date.timezone,如果没有服务器权限可以直接使用date_default_timezone_set函数进行设置下面我给大家介绍。
php提示 Notice: Use of undefined constant name - assumed
我们知道php在数组中写变量有二几种方法,我们出现这种提示就是你写成了[name]这种所以会有Notice: Use of undefined constant name - assumed name提示了,解决办法参考下文。
php错误提示:Call-time pass-by-reference has been deprecated
今天在写引用时突然出现了Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of getimagesize(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer错误,后来才知道原因是此方法已不被赞成并在 PHP/Zend 未来的版本中很可能不再支持了
phpmyadmin配置文件现在需要绝密的短语密码
在使用phpmyadmin时我们可能会碰到phpmyadmin配置文件现在需要绝密的短语密码错误提示,配置如下:phpmyadmin/config.inc.php,代码如下:
如果你的phpmyadmin中没有config.inc.php 这个文件我们要找到 phpMyAdmin 文件中有一个文件"config.sample.inc.php",然后重命名为"config.inc.php"上传服务器,然后把:$cfg['blowfish_secret'] = ";或其它值即可.
Warning: session_start() [function.session-start]
我的电脑中的错误提示:Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:APMServ-v5.2.6APMServ5.2.6wwwhtdocsKingNerOAuserUserKqManage.php:1) in D:APMServ-v5.2.6APMServ5.2.6wwwhtdocsKingNerOAusercheckaccess.php on line 2
Deprecated: Function session_register() is deprecated
今天在换了Php环境后我们发现有Deprecated: Function session_register() is deprecated错误提示了,我们先来看代码:
查了一下出现这个问题的地方不多,找到了另外一个方法,直接把
php错误Fatal error: Out of memory (allocated 262144)
昨天网站用着用着就提示了Fatal error: Out of memory (allocated 262144),后来百度搜索了一些解决方法,下面我分享给各位朋友。
从上面的Out of memory (allocated 262144)看出是超过了256MB了吧,这个我们只要调整一下php.ini中的一个参考即可,解决方法是修改php.ini,加大memory_limit
php中UTF8编码页面iconv转码失败
关于iconv遇到无法转码的字符时中断内容丢失,代码如下:
只会输出: 测试后出全会丢失.
mysql_connect提示
连接代码:
Make a phpinfo() page. Look for 'mysql.default_socket', 'mysqli.default_socket',and'pdo_mysql.default_socket'. Remember their value; this is where PHP is trying to connect to MySQL.
linux中phpMyAdmin错误提示Wrong permissions on configuration file, should no
我用的linux系统,今天使用phpmyadmin时出现Wrong permissions on configuration file,should not be world writable!错误提示,查资料一看,原来phpMyAdmin要在755权限下才能正常工作(777不行)。
PHP文件下载的小实例
这个文件下载实例做得非常的详细他是结合header函数与while fread函数把文件分断读出来然后再发送到客户端了,算得上一个标准的文件下载实例。
一个PHP文件下载的小实例