RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
php数据库提示 php显示数据库内容

php连接数据库 提示:no database selected

两种可能,要么没连上,要么不存在hij数据库

岑溪ssl适用于网站、小程序/APP、API接口等需要进行数据传输应用场景,ssl证书未来市场广阔!成为创新互联公司的ssl证书销售渠道,可以享受市场价格4-6折优惠!如果有意向欢迎电话联系或者加微信:18982081108(备注:SSL证书合作)期待与您的合作!

if(!mysql_select_db($this-db_database,$this-conn))上面添加一行来判断是否连上

if (!$this-conn)

{

die('Could not connect: ' . mysql_error());

}

PHP连接数据库后总是提示格式错误要怎么解决?求指点~

查看PHP7.1官方文档,对这种错误的解释

New E_WARNING and E_NOTICE errors have been introduced when invalid strings are coerced using operators expecting numbers (+ - * / ** % | ^) or their assignment equivalents. An E_NOTICE is emitted when the string begins with a numeric value but contains trailing non-numeric characters, and an E_WARNING is emitted when the string does not contain a numeric value.

在使用(+ - * / ** % | ^) 运算时,例如a+b,如果a是开始一个数字值,但包含非数字字符(123a),b不是数字值开始时(b456),就会有A non-numeric value encountered警告。

你的里面年月日的表达用了-,php认为是减号,年月日被认为是运算。

你可以搜一下网上的教程有解决办法。不过看你的截图,这只是个notice, 你可以在控制器加上ini_set("error_reporting","E_ALL ~E_NOTICE"); 就不会显示了。

php连接独享型数据库提示错误

检查你的数据库是否支持远程连接;检查你的数据库地址是否错误;

有些提供商的端口并不是3306;可能其它的;请检查后再试试


当前文章:php数据库提示 php显示数据库内容
本文地址:http://scyingshan.cn/article/dopsghj.html