好久前忘了在什么地方抄来的,一直好用,但是升级到php5.5就不好用了 出现警告
服务器无法修改php.ini 只好自己试着用mysqli写 但是一直写不出来 请高手指教!!
谢谢
回复讨论(解决方案) 把 mysql_ 都改成 mysqli_
>把 mysql_ 都改成 mysqli_
版主啊~ 那么改不行啊 错误更多了!!!!!
warning: session_start(): cannot send session cookie - headers already sent by
warning: mysqli_select_db() expects exactly 2 parameters, 1 given in
warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in
warning: mysqli_query() expects at least 2 parameters, 1 given in
deprecated: mysql_connect(): the mysql extension is deprecated and will be removed in the future: use mysqli or pdo instead in
对不起 最后的deprecated没有 粘错了
就等着你呢
出错是很正常的,改了就是了
不报错而又工作不正常,才是麻烦事
出错的 mysqli 函数是因为不能缺省数据库连接字
你把 $db 作为出错函数的第一个参数就可以了
ok解决了 谢谢版主