Blogger Information
Blog 8
fans 0
comment 0
visits 5800
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
计算图形的面积与周长-1
柯二南的博客
Original
1027 people have browsed it
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-type" content="text/html;  charset=UTF-8"  >
        <title>图形计算</title>
    </head>
    <body>
    <center>
        <h1>图形(周长&面积)计算</h1>
        <a href="calculate.php?action=rect">矩形</a>
        <a href="calculate.php?action=riangle">三角形</a>
        <a href="calculate.php?action=circle">圆形</a>
    </center>
    <?php
    error_reporting(E_ALL & ~E_NOTICE);

    function __autoload($classname) {
        include strtolower($classname) . ".class.php";
    }

    echo new Form("calculate.php");
    if (isset($_POST["sub"])) {
        echo new Result();
    }
    ?>
</body>
</html>


/*这是入口文件calculate.php。在建立本项目时,需要将所有的1-7的代码放在一个文件夹中方可运行。
*这个项目适合新手,体会一下面向对象的编程思想,很适合理解封装,继承,多态的三大特性。
*对于抽象类的继承,子类中如何实现抽象方法,都有涉及到。
*魔术方法__construct()、__toString()方法的合理利用,都可以去慢慢体会。
*项目效果图如下所示。
*/

12.png

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post