Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

phpÉÏÔØÎļþÖ»Äܱ£´æÒ»Ð¡²¿·Ö

<html>
<head>
  <title>Uploading...</title>
</head>
<body>
<h1>Uploading file...</h1>
<?php
    echo '<pre>';
    print_r($_FILES);
    echo '</pre>';
    if ($_FILES['userfile']['error'] > 0)
        {
          echo 'Prolem: ';
          switch ($_FILES['userfile']['error'])
          {
            case 1: echo 'File exceeded upload_max_filesize'; break;
            case 2: echo 'File exceeded max_file_size'; break;
            case 3: echo 'File only partially uploaded'; break;
            case 4: echo 'No file uploaded'; break;
          }
          exit;
}
    if ($_FILES['userfile']['type'] != 'application/x-zip-compressed')
        {
           echo 'Problem: file is not pdf';
           exit;
       }
    $upfile = '/upload/'.$_FILES['userfile']['name'];
     if (is_uploaded_file($_FILES['userfile']['tmp_name']))
        {   
     if (!move_uploaded_file($_FILES['userfile']['tmp_name'], $upfile))
          {
           echo 'Problem: Could not move file to destination directory';
            exit;
    &nb


Ïà¹ØÎĵµ£º

PHP——ÔËËã·ûºÍ¹Ø¼ü×Ö


Ô­ÎÄÁ´½Ó£ºhttp://www.phpdo.net/index.php/2010/01/29/1-5/
ÒÔÏ´úÂëÊǼ¸¸ö±í´ïʽµÄÀý×Ó£º
¡¡¡¡$a = “phpdo.net”;
¡¡¡¡$sum = $var_a + $var_b;
¡¡¡¡$i++;
 PHPÖÐÔËËã·ûÊDZí´ïʽÖжÔÔËËã·û½øÐвÙ×÷µÄ·ûºÅ£¬°üÀ¨ËãÊõÔËËã·û£¬×Ö·û´®ÔËËã·ûºÍÂß¼­ÔËËã·ûµÈ¡£
 PHPÓÐÒ»¸öÓëCÓïÑÔÀàËÆµÄ¸ÅÄî&mdash ......

phpº¯Êýcall_user_funcºÍcall_user_func_arrayÏê½â

call_user_funcº¯ÊýÀàËÆÓÚÒ»ÖÖÌØ±ðµÄµ÷Óú¯ÊýµÄ·½·¨£¬Ê¹Ó÷½·¨ÈçÏ£º
<?php
function a($b,$c)
{
    echo $b;
    echo $c;
}
call_user_func('a', "111","222");
call_user_func('a', "333","444");
//ÏÔʾ 111 222 333 444
?>
µ÷ÓÃÀàÄÚ²¿µÄ·½·¨±È½ÏÆæ¹Ö£¬¾ÓÈ»ÓõÄÊÇar ......

PHPÖÐJSONµÄÓ¦ÓÃ

»¥ÁªÍøµÄ½ñÌ죬AJAXÒѾ­²»ÊÇʲôİÉúµÄ´Ê»ãÁË¡£ËµÆðAJAX£¬¿ÉÄÜ»áÁ¢¼´ÏëÆðÒòRSS¶øÐËÆðµÄXML¡£XMLµÄ½âÎö£¬¿ÖÅÂÒѾ­²»ÊÇʲôÄÑÌâÁË£¬ÌرðÊÇPHP5£¬´óÁ¿µÄXML½âÎöÆ÷µÄÓ¿ÏÖ£¬Èç×îÇáÁ¿¼¶µÄSimpleXML¡£²»¹ý¶ÔÓÚAJAXÀ´Ëµ£¬XMLµÄ½âÎö¸üÇãÏòÓÚǰ̨JavascriptµÄÖ§³Ö¶È¡£ÎÒÏëËùÓнâÎö¹ýXMLµÄÈË£¬¶¼»áÒòÊ÷ºÍ½Úµã¶øÍ·´ó¡£²»¿É·ñÈÏ£¬XMLÊÇºÜ ......

MySQL+PHPÂÒÂë½â¾ö ÄÏÈý·½

 MySQL+PHP²úÉúÂÒÂëÔ­Òò£º
¡ô MySQLÊý¾Ý¿âĬÈϵıàÂëÊÇutf8,Èç¹ûÕâÖÖ±àÂëÓëÄãµÄPHPÍøÒ³²»Ò»ÖÂ,¿ÉÄܾͻáÔì³ÉMySQLÂÒÂ룻
¡ô MySQLÖд´½¨±íʱ»áÈÃÄãÑ¡ÔñÒ»ÖÖ±àÂë,Èç¹ûÕâÖÖ±àÂëÓëÄãµÄÍøÒ³±àÂë²»Ò»ÖÂ,Ò²¿ÉÄÜÔì³ÉMySQLÂÒÂ룻
¡ô MySQL´´½¨±íʱÌí¼Ó×Ö¶ÎÊÇ¿ÉÒÔÑ¡Ôñ±àÂëµÄ,Èç¹ûÕâÖÖ±àÂëÓëÄãµÄÍøÒ³±àÂë²»Ò»ÖÂ,Ò²¿ÉÄÜÔì³ÉMySQ ......

PHPʵÏÖhttpÓëhttpsµÄת»¯

http://blog.s135.com/read.php/142.htm
¡¡¡¡×î½üÔÚдPHP³ÌÐòʱ£¬ÐèҪʹä¯ÀÀÆ÷ÔÚhttpsºÍhttpÖ®¼äת»¯£¬ÉÏÍøËÑË÷Ïà¹ØÐÅÏ¢£¬ÎÞÄÎÖ»ÓÐ×î½üÔÚдPHP³ÌÐòʱ£¬ÐèҪʹä¯ÀÀÆ÷ÔÚhttpsºÍhttpÖ®¼äת»¯£¬ÉÏÍøËÑË÷Ïà¹ØÐÅÏ¢£¬ÎÞÄÎÖ»ÓÐһƪ½éÉÜÓÃASPʵÏÖ“ÔÚhttpºÍhttpsÖ®¼äת»¯”µÄÎÄÕ£¬ÓÚÊÇÖ»ºÃÐÐдÁËÓÃPHPʵÏÖhttpÓëhttpsת» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ