Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : php

PHP serialize()ÐòÁл¯µÄʹÓÃ

¿ÉÒÔ½«Êý×éºÍ¶ÔÏóÖ±½Ó´æÈëÊý¾Ý¿âÖеÄijһ×ֶΡ£
ʹserialize()Êǽ«Êý×é·´ÐòÁл¯ÔÙ´æÈëÊý¾Ý¿â£¬ÐòÁл¯»°ÍêµÄÊý¾Ý¾ÍÊÇÒ»¸ö×Ö·û´®¡£
ÌáÈ¡µÄʱºò£¬ÓÃunserialize()·´ÐòÁл¯È¡£¬È¡³öÀ´µÄ»¹ÊǸöÊý×é¡£
$arr = array('value1','value2','value3');
$str = serialize($arr); //ÐòÁл¯
$new_str = unserialize($temp); //·´ÐòÁл¯
print_r($str).'<br>';
print_r($new_str);
......

ÍøÕ¾Ä£ÄâµÇ½±¸Íü£¨php + python£©

 php°æ£º
<?php
$cookie_file = fopen('cookie.txt','w');//dirname(__FILE__)."/cookie_".md5(basename(__FILE__)).".txt"; // ÉèÖÃCookieÎļþ±£´æÂ·¾¶¼°ÎļþÃû

function vlogin($url,$data){ // Ä£ÄâµÇ¼»ñÈ¡Cookieº¯Êý
$curl = curl_init(); // Æô¶¯Ò»¸öCURL»á»°
curl_setopt($curl, CURLOPT_URL, $url); // Òª·ÃÎʵĵØÖ·
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // ¶ÔÈÏÖ¤Ö¤ÊéÀ´Ô´µÄ¼ì²é
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1); // ´ÓÖ¤ÊéÖмì²éSSL¼ÓÃÜËã·¨ÊÇ·ñ´æÔÚ
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // Ä£ÄâÓû§Ê¹ÓõÄä¯ÀÀÆ÷
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); // ʹÓÃ×Ô¶¯Ìø×ª
curl_setopt($curl, CURLOPT_AUTOREFERER, 1); // ×Ô¶¯ÉèÖÃReferer
curl_setopt($curl, CURLOPT_POST, 1); // ·¢ËÍÒ»¸ö³£¹æµÄPostÇëÇó
curl_setopt($curl, CURLOPT_POSTFIELDS, $data); // PostÌá½»µÄÊý¾Ý°ü
curl_setopt($curl, CURLOPT_COOKIEJAR, $GLOBALS['cookie_file']); // ´æ·ÅCookieÐÅÏ¢µÄÎ ......

ÍøÕ¾Ä£ÄâµÇ½±¸Íü£¨php + python£©

 php°æ£º
<?php
$cookie_file = fopen('cookie.txt','w');//dirname(__FILE__)."/cookie_".md5(basename(__FILE__)).".txt"; // ÉèÖÃCookieÎļþ±£´æÂ·¾¶¼°ÎļþÃû

function vlogin($url,$data){ // Ä£ÄâµÇ¼»ñÈ¡Cookieº¯Êý
$curl = curl_init(); // Æô¶¯Ò»¸öCURL»á»°
curl_setopt($curl, CURLOPT_URL, $url); // Òª·ÃÎʵĵØÖ·
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // ¶ÔÈÏÖ¤Ö¤ÊéÀ´Ô´µÄ¼ì²é
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1); // ´ÓÖ¤ÊéÖмì²éSSL¼ÓÃÜËã·¨ÊÇ·ñ´æÔÚ
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // Ä£ÄâÓû§Ê¹ÓõÄä¯ÀÀÆ÷
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); // ʹÓÃ×Ô¶¯Ìø×ª
curl_setopt($curl, CURLOPT_AUTOREFERER, 1); // ×Ô¶¯ÉèÖÃReferer
curl_setopt($curl, CURLOPT_POST, 1); // ·¢ËÍÒ»¸ö³£¹æµÄPostÇëÇó
curl_setopt($curl, CURLOPT_POSTFIELDS, $data); // PostÌá½»µÄÊý¾Ý°ü
curl_setopt($curl, CURLOPT_COOKIEJAR, $GLOBALS['cookie_file']); // ´æ·ÅCookieÐÅÏ¢µÄÎ ......

PHPÊý¾Ý¿âµÄ²Ù×÷


1. ½¨Á¢ºÍ¹Ø±ÕÁ¬½Ó
1) mysql_connect()
    resource mysql_connect([string hostname [:port][:/path/to/socket][,string username] [,string password]])
    ËùÓвÎÊý¶¼ÊÇ¿ÉÑ¡µÄ
    ¾ÙÀý:
    @mysql_connect("localhost", "user", "password")
    or die("Could not connect to mysql server!");
    ×¢Òâ,@·ûºÅ±íʾ½ûֹʧ°Ü³¢ÊÔµ¼ÖµÄÈκδíÎóÐÅÏ¢,Óû§½«¿´µ½µÄÊÇdie()ÖÐÖ¸¶¨µÄ´íÎóÐÅÏ¢.
    
    ×¢Òâ,µ±Óë¶à¸ömysql½øÐÐÁ¬½Óʱ,±ØÐëÖ¸¶¨Ã¿¸öÁ¬½ÓµÄÁ´½ÓID,ÈçÏÂ:
    $link1 = @mysql_connect("server1", "user", "password")
    or die("Could not connect to mysql server!");
    $link2 = @mysql_connect("server2", "user", "password")
    or die("Could not connect to mysql server!");
2) mysql_pconnect()
   resource mysql_pconnect([string hostname [:port][:/path/to/socket][,string username] [,string password]])
& ......

phpÁ¬½ÓaccessµÄÀà

<?php
/*
 * Created on 2008-10-25
 *
 * developer by Alex.do QQ:20779512
 * PHP 5.0
 */
 class mdbClass {
    var $dbPath = 'database/#123123#.mdb';    //Êý¾Ý¿â·¾¶
    var $tabName;            //±íÃû
    var $aryChar;            //дÈë¡¢²éѯ²Ù×÷ʱΪÁеļ¯ºÏ£¬¸üвÙ×÷ʱΪ¸üоßÌåÄÚÈÝ
    var $aryText;            //дÈë²Ù×÷ʱΪֵµÄ¼¯ºÏ£¬¸üС¢É¾³ý¡¢²éѯ²Ù×÷ʱΪ¸üеÄÌõ¼þ£¬ÅúÁ¿Ç븳Óè1=1
    var $showMessage;        //²Ù×÷·µ»ØµÄÌáʾ
    var $pageCode = 1;        //µ±Ç°Ò³£¬³ÌÐòĬÈÏΪ1
    var $pageSize = 10;        //ÿҳÏÔʾ¼Ç¼Êý£¬³ÌÐòĬÈÏΪ10
  &n ......

phpÁ¬½ÓaccessµÄÀà

<?php
/*
 * Created on 2008-10-25
 *
 * developer by Alex.do QQ:20779512
 * PHP 5.0
 */
 class mdbClass {
    var $dbPath = 'database/#123123#.mdb';    //Êý¾Ý¿â·¾¶
    var $tabName;            //±íÃû
    var $aryChar;            //дÈë¡¢²éѯ²Ù×÷ʱΪÁеļ¯ºÏ£¬¸üвÙ×÷ʱΪ¸üоßÌåÄÚÈÝ
    var $aryText;            //дÈë²Ù×÷ʱΪֵµÄ¼¯ºÏ£¬¸üС¢É¾³ý¡¢²éѯ²Ù×÷ʱΪ¸üеÄÌõ¼þ£¬ÅúÁ¿Ç븳Óè1=1
    var $showMessage;        //²Ù×÷·µ»ØµÄÌáʾ
    var $pageCode = 1;        //µ±Ç°Ò³£¬³ÌÐòĬÈÏΪ1
    var $pageSize = 10;        //ÿҳÏÔʾ¼Ç¼Êý£¬³ÌÐòĬÈÏΪ10
  &n ......

PHP Ϊʲôfunction


PHP Ϊʲôfunction ÔÚÉùÃ÷ʱûÓÐÉùÃ÷²ÎÊý,¶øµ÷ÓÃʱ¼ÓN¸ö²ÎÊýÈ´ÊÇÔÊÐíµÄ
2008-11-13 20:14:38    ÆäËû |  ÆÀÂÛ(7) |  ä¯ÀÀ(721)
ÈçÌâ
//ÉùÃ÷
function test(){};
$a = '';
$b = '';
$c = '';
//µ÷ÓÃ
test($a,$b,$c,1,2,3);
ÏàÐŲ»ÉÙÐֵܽãÃÃÒ²Ôø¾­Óöµ½Í¬ÑùµÄÎÊÌâ¡£
why?
¸Õ¿ªÊ¼ÎÒҲͦÓôÃÆ£¬ºó·­ÁË·­ÊÖ²áÕÒµ½ÁË´ð°¸
--------------------------------------
PHP supports passing arguments by value (the default), passing by reference, and default argument values. Variable-length argument lists are also supported, see also the function references for func_num_args(), func_get_arg(), and func_get_args() for more information.
---------------------------------------------
Ô­À´PHPÖ§³Ö±ä³¤²ÎÊýÁÐ±í£¨Variable-length argument lists £©
int func_num_args(void)¿ÉÒԵõ½²ÎÊý³¤¶È
such as:
function test()
{
    echo func_num_args();
}
test(0, 1, 2, 3); // ÏÔʾ: 4
mixed func_get_arg(int $arg_num)¿ÉÒԵõ½Ò»¸ö²ÎÊýÖµ
such as:
function test()
{
    echo fu ......

phpÖеÄewebeditor±íµ¥µ÷ÓÃ

 Ïà¹Ø²ÎÊý£º<textarea name=content>
Ä£°åµ÷Ó÷û£º$
¡¡¡¡Ìá½»ÐÂ±íµ¥µÄʱºòÓÃÈçÏ´úÂ룬½á¹ûÍêÈ«Õý³££º
<form name="frm_HelpMessageAdd" id="frm_HelpMessageAdd" action="manage.php" method="POST" enctype="multipart/form-data">
<input name="content" type="hidden" id="shopProduct_Intro">
<iframe ID="eWebEditor1" src="other/editor/ewebeditor.php?id=shopProduct_Intro&style=standard" frameborder="0" scrolling="no" width="500" HEIGHT="350"></iframe>
<?php
$action = strtolower($_GET["action"]);
if($action == "do")
{
echo htmlspecialchars($_POST["shopProduct_Intro"]);
}
?>
¡¡¡¡´ò¿ª´ËIDÐòºÅ½øÐÐÐÞ¸Äʱ³öÏÖiframe¿òÖÐÎÞÈκÎÄÚÈÝ£¬ÐÞ¸ÄÒ³Ãæ´úÂëÈçÏ£º
<?php
$value = $htmlspecialchars("content");
?>
<form name="frm_HelpMessageAdd" id="frm_HelpMessageAdd" action="manage.php" method="POST" enctype="multipart/form-data">
<input name="content" type="hidden" id="shopProduct_Intro" value="<?php echo "$value"; ?>">
<iframe ID="eWe ......
×ܼǼÊý:2174; ×ÜÒ³Êý:363; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [301] [302] [303] [304] 305 [306] [307] [308] [309] [310]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ