【发布时间】:2015-02-16 17:45:22
【问题描述】:
我有以下代码
<!doctype html>
<head>
<meta charset = "utf-8">
<title>Objects</title>
</head>
<body>
<?php
class firstClass
{
function _construct($param)
{
echo "Constructor called with parameter $param";
}
}
$a = new firstClass('one');
?>
</body>
</html>
当我运行这段代码时,浏览器中没有任何输出,我正在遵循的教程说这段代码应该输出“使用参数苹果调用的构造函数”,这是什么问题?
【问题讨论】: