Home  >  Article  >  Backend Development  >  PHP 中的计算机程序该怎么写?如何封装?

PHP 中的计算机程序该怎么写?如何封装?

WBOY
WBOYOriginal
2016-06-06 16:45:151286browse

老师让我们写个简单的 PHP 计算机程序,关键是不懂如何封装。

回复内容:

老师叫我做一台汽车,关键是不懂如何炼钢。 计算器吧 我直接把你的这个作业做了吧:把下面的这一行代码保存为一个 XXX.php 的纯文本文件,你就可以交差了:

<?php phpinfo(); ?>

这个完全满足你的老师的要求,它是一个程序,这个程序运行之后可以显示出服务器端PHP相关的信息,另外这个程序还是PHP语言写的。
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn