-
PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in解决方法
本文为大家讲解的是PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in错误的解决方法,感兴趣的同学参考下。 错误描述 PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /web/xxx.php on line 行号 或 PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /web/xxx.php on line 行号 原因分析 在执行mysql_fetch_array方法获取数据时,提交给该方法的查询资源是无效的...
PHP 2015-01-02 03:15:03 -
php错误:PHP Warning: date(): It is not safe to rely on the system's timezone settings.解决方法
本文为大家讲解的是PHP Warning: date(): 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 in问题的解决方法,感兴趣的同学参考下. 在写php程序中有时会出现这样的警告: PHP Warning: date(): It is not safe to rely on the system's timezone se...
PHP 2015-01-02 02:54:03 -
Last_IO_Error: error connecting to master解决方法 mysql错误
本文为大家讲解的是mysql错误:Last_IO_Error: error connecting to master解决方法,感兴趣的同学参考下。 错误提示: Slave_IO_Running: Connecting Slave_SQL_Running: Yes Last_IO_Errno: 2003 Last_IO_Error: error connecting to master '[email protected]:3306' - retry-time: 60 retries: 1 错误原因: 主数据库服务器没有关闭防火墙...
数据库操作教程 2015-01-01 14:54:08 -
linux系统下php安装mbstring扩展的二种方法
本文为大家提供的是linux系统下php安装mbstring扩展的二种方法,感兴趣的同学参考下. 1...
PHP 2015-01-01 01:36:03 -
PHP输出缓存(output_buffering)使用详解
本文为大家讲解的是PHP输出缓存(output_buffering)使用详解,感兴趣的同学参考下。 首先明确一下PHP的输出顺序 1.打开了php输出缓存: echo,print -> php output_buffring -> server buffering -> browser buffering -> browser display 2.未打开php输出缓存: echo,print -> server buffering -> browser buffering -> browser display 另外明确一下浏览器的输出缓存:IE为256Bytes, Chrome与FireFox为1000Bytes,只有输出数据达到了这个长度或者脚本结束浏览器才会将数据输出在页面上 再来说说用到的几个PHP设置和API: 1.php.ini中的output_buffering配置 •Off: 表示关闭PHP输出缓存 •On: 打开无限大的输出缓存 •4096: 打开大小为4096Byte...
PHP 2015-01-01 00:18:05 -
PHP Warning: unlink(/xxx/xxx/xxx) : Is a directory in
本文为大家讲解的是PHP Warning: unlink(/xxx/xxx/xxx) : Is a directory in 错误的原因和解决方法,感兴趣的同学参考下。 错误描述 PHP Warning: unlink(/xxx/xxx/xxx/) [<a href='function.unlink'>function.unlink</a>]: Is a directory in /web/xxx.php on line 行号 错误原因 unlink只能删除文件,不能删除目录 解决方法 根据错误行号,查看是否传给unlink的参数是个目录而不是一个文件...
PHP 2014-12-31 23:15:05 -
phpQuery占用内存过多的处理方法
本文为大家讲解的是phpQuery占用内存过多的处理方法,感兴趣的同学参考下. phpQuery是一个用php实现的类似jQuery的开源项目,可以在服务器端以jQuery的语法形式解析网页元素。 相对于正则或其它方式匹配网页方式,phpQuery使用起来要方便的多...
PHP 2014-12-31 22:27:04 -
php调用nginx的mod_zip模块打包ZIP文件
本文为大家讲解的是php调用nginx的mod_zip模块打包ZIP文件的方法,感兴趣的同学参考下。 php 本身有 zip 模块,可以生产 zip 文件...
PHP 2014-12-30 07:00:05 -
Php output buffering缓存及程序缓存使用详解
本文为大家讲解的是Php output buffering缓存及程序缓存使用详解,感兴趣的同学参考下。 在php中有时为了控制程序的输出显示顺序,提供了output buffering缓存(php自身缓存机制)...
PHP 2014-12-29 05:54:17 -
php设计模式 Singleton(单例模式)
本文为大家提供的是php设计模式 中的Singleton(单例模式)示例代码,感兴趣的同学参考下。 保证一个类仅有一个实例,并提供一个访问它的全局访问点 <?php /** * 单例模式 * * 保证一个类仅有一个实例,并提供一个访问它的全局访问点 * */ class Singleton { static private $_instance = null; private function __construct() { } static public function getInstance() { if(is_null(self::$_instance)) { self::$_instance = new Singleton(); } return self::$_instance; } public function display() { echo "it is a singlton class function"; } } // $obj = new Singlet...
PHP 2014-12-28 19:12:04 -
php 无法加载mcrypt.dll的解决办法
本文为大家讲解的是php 无法加载mcrypt.dll的解决办法,感兴趣的同学参考下。 1.php.ini里面查找extension=php_mcrypt.dll,去掉前面的分号”;” ,重启apache.无效(注意:在AppServ中php.ini在dinwos目录下) 2.复制php目录下的libmcrypt.dll到windows/system32目录下,重启IIS ,无效 3.自己总结的办法:试着尝试了一下,将libmcrypt.dll复制到apache的bin目录下,生效...
PHP 2014-12-28 18:27:03 -
jQuery+php实现ajax文件即时上传示例
本文为大家讲解的是jQuery+php实现ajax文件即时上传示例,感兴趣的同学参考下。 很多项目中需要用到即时上传功能,比如,选择本地图片后,立即上传并显示图像...
PHP 2014-12-28 18:03:11