【发布时间】:2013-05-06 10:05:47
【问题描述】:
我的 php 析构函数代码目前有问题。
首先,我有一个这样的基本 html 文档:
<!doctype html>
<html lang="en">
<head><title>Home</title></head>
<body>
<?php include('Table.php');
$T = new Table();
?>
</body>
</html>
问题是代码“new Table()”应该在构造函数中回显“<table>”,而在析构函数中回显“</table>”。我的问题是我得到以下代码,但我不知道如何修复它:
<!doctype html>
<html lang="en">
<head><title>Home</title></head>
<body>
<table>
</body>
</html></table>
【问题讨论】:
标签: php oop destructor