PHP致命错误:通过引用的引用时间已被删除

前端之家收集整理的这篇文章主要介绍了PHP致命错误:通过引用的引用时间已被删除前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个古老的脚本,最近我得到这个错误: @H_403_1@Fatal error: Call-time pass-by-reference has been removed in /****/******/public_html/****/cp-list-summary.PHP on line 100

并且它看起来像这个文件上的第100行:

@H_403_1@if ($row[images]) { $image_set = array (); $result = MysqL_query ('SELECT fname FROM ' . $dbimgs . ' WHERE listid=\'' . $_GET['id'] . '\' ORDER BY id ASC',$link); while ($images = MysqL_fetch_array ($result)) { array_push (&$image_set,$images[fname]); } }

什么原因导致错误和如何解决?我不是开发者,所以请慢点.

你试图在array_push中传递一个指向你的数组的指针.这就是为什么遇到致命错误的原因.只需使用: @H_403_1@array_push( $image_set,$images[fname] );

Note: array_push() will raise a warning if the first argument is not an array.

猜你在找的PHP相关文章