0 php oop error-handling function
以下代码适用于我的大学项目.当我作为网页运行时,最后一行有错误...我需要有关如何解决此问题的帮助.
<?php
include_once 'ShapeClass.php';
class Square extends Shape
print "<h2>This square's side is not bigger than the parallelogram's height</h2>";
}
break;
}
?>
Run Code Online (Sandbox Code Playgroud)
正确的方式..
<?php
include_once 'ShapeClass.php';
class Square extends Shape
{
function __construct()
{
print("<h2>This square's side is not bigger than the parallelogram's height</h2>");
}
}
Run Code Online (Sandbox Code Playgroud)
break声明.print在课堂上.您需要将其包装在方法中.{后您的class| 归档时间: |
|
| 查看次数: |
61 次 |
| 最近记录: |