jqueryÐòÁл¯ºÍ php ·´ÐòÁл¯µÄÎÊÌâ?
jqueryÐòÁл¯ºÍ php ·´ÐòÁл¯µÄÎÊÌâ?
HTML code:
test.htm
<SCRIPT type="text/javascript" src="js/jquery-1.3.2.min.js"></SCRIPT>
<SCRIPT type="text/javascript">
var strform=$("form").serialize();
$.ajax({
type:'POST',
data: strform,
url:'add.php',
success:function(data) { }
</SCRIPT>
<form>
<input tpye="text" id=name1 name=name1 /><input tpye="text" id=age1 name=age1 /> <button>(¶¯Ì¬)Ôö¼Ó(Ò»ÐÐ)</button>
<input tpye="text" id=name2 name=name2 /><input tpye="text" id=age2 name=age2 />
<input tpye="text" id=name3 name=name3 /><input tpye="text" id=age3 name=age3 />
......
</form>
add.php
PHP code:
<?php
//ÇëÎÊÕâÀïÔõÑù°Ñjquery $("form").serialize() ÐòÁл¯µÄÖµ½âÎö²¢´æÈëÊý¾Ý¿â???
//Äѵã: <form>ÀïµÄÖµÊDz»È·¶¨µÄ,¿ÉÄÜÊÇ&name1=&age1 ,Ò²¿ÉÄÜÊÇ&name1=&age1=&name3=&age3=
//ËùÒÔÐòÁл¯ºóµÄÖµÒ²²»È·¶¨
?>
лл
ÔÚphpÀï´¦Àí·½Ê½ºÍƽʱһÑù£¬ ÄǸöjqueryÐòÁл¯Ö»ÊÇ·½±ã´«ËÍ£¬ ²»»á×÷³öÆäËü¸Ä±ä£¬
Äã´òÓ¡Ò»ÏÂ$_PO
Ïà¹ØÎÊ´ð£º
PHP code:
$date = '2009-12-25';
$ptn = '/([\d]{4})[- \/](0?[\d]|1[0-2])[-\/ ](0?[\d]|[1-2][\d]|3[0-1])/';
if (preg_match($ptn,$date,$out))
{
print_r($out);exit();
}
½á¹ûΪ:
PHP code:
......
ÇëÎÊ£¬ÒÔÏ´úÂ룬Ϊʲô²»¹ÜÓ㿾Ístr_replaceÕâ¸öº¯Êý£¬Ì滻ôÓÐÆð×÷Óã¿
PHP code:
$gg='<script type=\"text/JavaScript\">
alimama_pid=\"mm_14281022_2030060_8250750\";
alima ......
zend guard¼ÓÃܵÄphpÊÇ¿ÉÒÔÆÆ½âµÄ£¬ÓÐµÄ ËµÊÇʹÓú¯Êý»ìÏý¿ÉÒÔ¸üÄÑÆÆ½âһЩ¡£ÔõôʹÓÃÄØ¡£
»òÕß´ó¼Ò¸æËßÎÒÄÄÖÖ¼ÓÃÜ·½Ê½¸ü°²È«¡£Ð»Ð»ÁË¡£
ÎÒĿǰµÄzend guard°æ±¾ÊÇ4.0.1
ÎÞ½â
ÒýÓÃ
ÎÞ½â
²»¿ÉÄܰɡ£ÔÚÍøÉϲéÁ ......
init.php
<?php
function test1() {}
?>
test.php
<?php
class test{
$t;
function __construct(){
$this->t=test1;   ......