当前位置:Gxlcms > PHP教程 > Commentsstartingwith#aredeprecatedinUnknownonline1

Commentsstartingwith#aredeprecatedinUnknownonline1

时间:2021-07-01 10:21:17 帮助过:31人阅读

ErrorException [ 8192 ]: Comments starting with '#' are deprecated in Unknown on line 1

8192 E_DEPRECATED (integer) 运行时通知。启用后将会对在未来版本中可能无法正常工作的代码给出警告。 since PHP 5.3.0

错误码来自:http://www.gxlcms.com/article/47793.htm

应该是新版本的PHP出现的一个mysql推荐用mysqlli和pdo提示的问题,把错误关掉,再打开就好了,这块儿可能PHP还是有点问题:

error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);//解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:

ini_set('display_startup_errors', 0);

ini_set('display_errors', 0);

I setup an Ubuntu system with nginx and php, but i noticed a strange error.

Every time i run something php related in the console i get this strange error:

PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/ming.ini on line 1 in Unknown on line 0

I googled for some minutes and found why is that happening and how to fix it. The solution is open the file:

vi /etc/php5/cli/conf.d/ming.ini

and replace the “#” in the first line with “;” and that will fix the “warning”.

使用新立得装的PHP,但是每次我在命令行下执行php脚本时都会出如下的警告信息:

PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0

上网查了一下,原来是新版本的PHP不赞成用'#'号作为注释符号,需要用分号';'。打开这个文件,把里面的#替换成;号,问题解决!

来自:http://blog.163.com/mity_rui@126/blog/static/109813618201522525339369/

http://www.r00t.gr/how-to-fix-php-deprecated-comments-starting-with-are-deprecated-in-etcphp5cliconf-dming-ini-on-line-1-in-unknown-on-line-0/

人气教程排行