
php基础提升
Moon_K_H
这个作者很懒,什么都没留下…
展开
-
一个小的动态验证
Picture Verfication<body background="../image/1.jpg" style="font-size:16px; color:#000099;font-family:'宋体'"><table width="166" border="1" align="center" bordercolor="#CCCCCC"bordercolorlight="#F原创 2015-12-15 15:45:21 · 548 阅读 · 0 评论 -
一个小小的购物车系统
index.php:<?phpsession_start();?> Shopping Cart <?php switch($_GET[link]) { case "Computer"; include_once("in_1.php"); break; case "H原创 2015-12-17 16:06:13 · 956 阅读 · 0 评论 -
动态输出JS代码
<?php $str=<<<mark alert("welcome into php code world!"); mark; echo $str;?>原创 2015-11-30 21:06:12 · 718 阅读 · 0 评论 -
自定义函数
<?phpecho "";echo "Number Conmand:";echo "";echo ""; define("PI",3.1415926);function Encrypt($str){ return $str=$str+PI;}function Decrypt($str){ return $str=$str-PI;}if($_POST[sub])原创 2015-11-30 21:10:53 · 347 阅读 · 0 评论 -
变量基本输出
<?php $str ="hello world!!!"; echo "$str";?>原创 2015-11-30 21:07:54 · 332 阅读 · 0 评论 -
使用常量值
<?php define("PI",3.1415); $r=10; echo "circle of radius 10 units of area:".PI*($r*$r);?>原创 2015-11-30 21:10:15 · 455 阅读 · 0 评论 -
区分单引号和双引号
<?php $a = 1; echo"The strings is:$a".""; echo'printf string:$a';?>原创 2015-11-30 21:05:16 · 486 阅读 · 0 评论 -
使用可变变量
<?php $str_name="str_name_1"; $str_name_1="I like PHP"; echo $$str_name;?>原创 2015-11-30 21:09:32 · 522 阅读 · 0 评论 -
打印系统环境变量
<?php print_r($_ENV);?>原创 2015-11-30 21:08:45 · 604 阅读 · 0 评论 -
数字跟字符串的转换
<?php $a =10; $b ="I is a string value"; $e =$a+$b; $f =$b+$a; echo "automatic type conversions: "; echo '10+I is a string value='.$e.""; echo "force type conversions: "; echo '10+I is a strin原创 2015-11-30 21:07:15 · 377 阅读 · 0 评论 -
if..else 语句应用
Users: password : <?php if($_POST['sub']) { if($_POST['user']=='admin' and $_POST['pwd']='admin') { echo "Current VIP user"; } else { echo "You are a visitors"; } }?>原创 2015-12-15 09:39:21 · 499 阅读 · 0 评论 -
IF语句应用
Performance evaluation criteria <table border="1" bordercolor="#000099" bordercolorlight="#000099" cellspacing="0"> Please input test performance: <input type="text" size="10" name="text"原创 2015-12-15 09:38:09 · 423 阅读 · 0 评论 -
foreach()And array() Function
This is a simple birthday reminders:The current date:<?php $a = array("zhangsan"=>"05月30日","lisi"=>"05月28日","wangwu"=>"05月29日"); foreach($a as $key => $value){ if(date("m月d日") == $v原创 2015-12-14 18:04:59 · 386 阅读 · 0 评论 -
修改小程序
Employee information management b{ color:#FFFFFF; font-family:"楷体_gb2312";} Name/td>AgeSexCall Home addresssOperation<?php $link = mysql_pconnect("localhost", "roo原创 2015-12-17 20:00:40 · 619 阅读 · 0 评论