search
Homephp教程php手册php小功能详解

php小功能详解

Jun 13, 2016 am 10:48 AM
jsfphppostselectsubmitFunctionSmallDetailed explanation

$dy=$_POST["dy"];
$de=$_POST["de"];
$jsf=$_POST["select"];
$qingkong=$_POST["qingkong"];
$Submit=$_POST["Submit"];

if($jsf=="jia"){
$zhi=$dy+$de;
$zhi="你的计算结果为:$zhi";
}
if($jsf=="jian"){
$zhi=$dy-$de;
$zhi="你的计算结果为:$zhi";
}
if($jsf=="chen"){
$zhi=$dy*$de;
$zhi="你的计算结果为:$zhi";
}
if($jsf=="chu"){
if($de=="0"){
$zhi="被除数不能为0,请从新输入有效的数字!";
}else{
$zhi=$dy/$de;
$zhi="你的计算结果为:$zhi";
}
}
if($jsf=="yu"){
if($de=="0"){
$zhi="求余数不能为0";
}else{
$zhi=$dy%$de;
}
}

if($qingkong=="清空"){
unset($dy,$de,$zhi);
}

?>


计数器













简单计算器














摘自 战地日记_LAMP兄弟连
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use