我们知道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不行)。
Deprecated: Function set_magic_quotes_runtime() is deprecated
今天在把php升级之后运行一个页面出现了Deprecated: Function set_magic_quotes_runtime() is deprecated in F:\wwwroot\mongodb\manage\app.php on line 13错误,后来百度了才知道原因高版本的php把set_magic_quotes_runtime去了,官方提供的解决办法:
新浪微博PHP版SDK的导致20007错误
新浪微博有个高级接口'statuses/upload_url_text'(需要在open.weibo.com中额外申请),传递一个图片URL地址和文本内容,就可以发一条图文微博,对应在php版SDK的function如下:
php 字符串编码转换程序
iconv函数的一个bug。iconv在转换字符"—"到gb2312时会出错,解决方法很简单,就是在需要转成的编码后加 "//IGNORE" 也就是iconv函数第二个参数后.以下为引用的内容: