All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
PHP实例:PHP批量生成缩略图_[PHP教程]
全面接触SQL语法(6)_[SQL,Server教程]
Net2005中的MD5加密_[Asp.Net教程]
一种通过sql,server的作业调度+存储过程来建立自动备份的方法_[SQL,Server教程]
ASP.NET跨页面传值技巧总结_.net资料_编程技术
SQL 外链接操作小结 inner join left join right join_[SQL Server教程]
delphi构造函数与析构函数的使用方法
asp.net2.0标准服务器控件典型应用
用好VS2005之扩展membership服务_[Asp.Net教程]
一个使用存储过程实现的用户登录功能(含代码)_[Asp.Net教程]
Reading number is top 10 pictures
毛俊杰-能量永动机
网络游戏与脑残
The wise woman of chest1
美洲杯宝贝的雨中风情2
Summer is most suitable for young people to travel in China10
Beauty shocked Japan Tokyo motor show model
The household design, do not do bridal chamber a pity
这才叫绝色美女2
The money of more than 100 countries and regions15
Photographed the passion of the clients and prostitutes in the sex trade picture2
Download software ranking
apache-tomcat-6.0.33
SP4 for SQL2000
C#编程思想
WebService在.NET中的实战应用教学视频 → 第3集
实战黑客不求人
Unix video tutorial4
Proficient in Eclipse
Tram sex maniac 2 (H) rar bag16
小黑猫大战两米大花蛇
VC++6.0培训教程
aaa published in(发表于) 2013/12/21 22:25:19 Edit(编辑)
PHP动态网站开发中常用的8个小技巧_php资料_编程技术

PHP动态网站开发中常用的8个小技巧_php资料_编程技术

PHP动态网站开发中常用的8个小技巧_php资料_编程技术-你的首页-uuhomepage.com
本文总结了PHP日常开发中常用的8个小技巧。

PHP批最取得checkbox的值

1、命名


2、使用

当计划当作sql指令的一部分时:如果参与控制的字段是数值型的,则

if(! empty($_POST['checkbox'])) {
$expr = join(",", $_POST['checkbox']);
$sql = "select * from tbl_name where field in ($expr)";
}

如果参与控制的字段是数值型的,则

if(! empty($_POST['checkbox'])) {
$expr = "'".join("','", $_POST['checkbox']).".";
$sql = "select * from tbl_name where field in ($expr)";
}

PHP判断Form表单是否提交

$action=$HTTP_POST_VARS["Button1"];
if($action=="提交")
{
//执行表单操作
}
else
{
//读取默认值
}

PHP 获取字符串长度

strlen($myrow[1])

PHP Url转向

Header("Location: ".$_SERVER["HTTP_REFERER"]);

PHP超全局对象

$a = 1;
$b = 2;
function Sum()
{
$GLOBALS["b"] = $GLOBALS["a"] + $GLOBALS["b"];
}
Sum();
echo $b;
?>

PHP 表单取值

如果 mothod="get" 就用 $_GET["test"] 代替$test
如果 mothod="post" 就用 $_POST["test"] 代替$test

PHP取得当前IP


PHP 取得当前时间

echo date("Y-m-d G:i:s");
?>
date("Y年m月d日")
Date ("Y-n-j")




添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.