php阶乘php求阶乘
php阶乘
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gbk" /> <title>php阶乘</title> </head> <body > <?php if (isset($_POST['button'])) { $num = $_POST['num']; if ($num =='' || ! is_numeric($num) || $num < 0) { echo '请输入大于等于0的数字'; } else { $num+= 0; if (true) { if ($num==0) { echo '0!是1'; } else { $result=1; for($i=1;$i<=$num;$i++) { $result*=$i; } echo "{$num}!是{$result}"; } } else { echo '您收入的不是整数'; } } } ?> <form action="" method="post" name="form1"> <table width="500" border="1"> <tr> <th colspan="2">求阶乘</th> </tr> <tr> <td>请输入一个数</td> <td><input name="num" id="num" type="text" /></td> </tr> <tr> <td colspan="2" align="center"><input type="submit" name="button" id="button" value="提交" /></td> </tr> </table> </form> </body> </html>
PHP7.0~PHP7.1~PHP7.2~PHP7.3~PHP7.4新特性php 7.4
PHP7.0~PHP7.1~PHP7.2~PHP7.3~PHP7.4新特性php 7.2 7.3
PHP之——在WAMPSERVER下增加多版本的PHP(PHP5.3,PHP5.4,PHP5.5)支持。wampserver打开php项目
PHP之——在WAMPSERVER下增加多版本的PHP(PHP5.3,PHP5.4,PHP5.5)支持。wampserver开发php网页
PHP配置指令作用域说明(PHP,INI,PERDIR、PHP,INI,SYSTEM、PHP,INI,USER、PHP,INI,ALL)php 作用域
PHP - 什么是 PHP? 为什么用 PHP? 有谁在用 PHP?为什么说php
[PHP] PHP的纯CPU基准测试(PHP5.5.9 vs PHP7.2.1)php性能测试
[PHP问题]PHP Warning: PHP Startup: Unable to load dynamic library ‘C:/AppServ\php5php基础问题