PHP怎样编辑一个图形计算器?
发布时间:2022-04-18 13:57:17 所属栏目:语言 来源:互联网
导读:PHP如何编写图形计算器?对四则运算计算器我们都很熟悉了,有些朋友就好奇能不能对图像计算呢?当然是可以的,下面就给大家介绍一下如何实现三角形,矩形和圆形计算的简易计算器。 主函数:index.php !doctype html html head meta charset=utf-8 title图形
PHP如何编写图形计算器?对四则运算计算器我们都很熟悉了,有些朋友就好奇能不能对图像计算呢?当然是可以的,下面就给大家介绍一下如何实现三角形,矩形和圆形计算的简易计算器。 主函数:index.php <!doctype html> <html> <head> <meta charset="utf-8"> <title>图形计算器</title> <style> * { margin: 0px; padding: 0px; } #contains { width: 500px; margin: 20px auto; background: #0C0; text-align: center; } h1 { width: 500px; height: 60px; } a { font-size: 20px; text-decoration: none; } #footer { width: 300px; background: #fff; margin: 0 auto; padding: 5px 10px; border-radius: 150px; } </style> </head> // include "shape.class.php"; // include "rect.class.php"; if (!empty($_GET['action'])) { // echo "传送成功"; $classname = ucfirst($_GET['action']); $shape = new $classname($_POST); $shape->view($_POST); (编辑:常州站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |