我在设置Built2Go汽车经销商时需要对错误来源进行一些研究,需要帮助调整代码
不推荐使用:在第185行的C:\ xampp \ htdocs \ speedyautos \ install.php中弃用了按引用分配new的返回值
第182至200行
if ($level == "4")
{
$Install = &new INSTALL();
$Install->INSTALLS();
if ($Install->InstallError)
{
$GetResult = "<div class=\"error\">Style Import Failed. Error below: <br /><br />$Install->InstallError</div>";
$submitbtn = "<input type=\"hidden\" name=\"level\" value=\"4\" /><input class=\"button\" type=\"submit\" name=\"next\" value=\"Redo to Step 4\" /></form></div>\n";
}
else
{
$GetResult = "<div class=\"error\">$Install->msg</div>";
$GetResult .= "<a href='admincp/index.php'>Login to Your Admin</a></p>
<p align=\"center\">Thank you for the Installing The $name_of_site Script. It is required to Delete this install script once done.</p>\n";
$submitbtn = "<div class=\"boxcontent\">Finished</div></form>\n";
}
不推荐使用:在第434行的C:\ xampp \ htdocs \ speedyautos \ admincp \ func.php中弃用了按引用分配新值的返回值
第429至439行读
$CarInfo = new Cars($db);
$CarInfo->GetMostPopular();
if (!eregi("admincp", $_SERVER['REQUEST_URI']))
{
$db = new DBM;
$Booth = &new Booth($db);
if ($SystemInfo->_systemstatus['Display_Poll'] == 'A')
{
$Poll = $Booth->display_booth();
}
}
答案 0 :(得分:2)
$Install = &new INSTALL();
在这种情况下, &
签名是没有意义的,因为在php 5对象是通过引用传递的(或者要清楚:对象的引用是按值传递的。)
答案 1 :(得分:1)
删除'new` for.e.g
之前的&
$Install = &new INSTALL();
应为$Install = new INSTALL();
<强>加强>
同样适用于$Booth = &new Booth($db);
它应该是$Booth = new Booth($db);