Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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¡·ÄÚÈݽéÉÜ

¿ª·¢WebÓ¦ÓóÌÐòPHPÊÇ×îÀíÏëµÄ¹¤¾ß£¬Ò×ÓÚʹÓᢹ¦ÄÜÇ¿´ó¡¢³É±¾µÍÁ®¡¢¸ß°²È«ÐÔ¡¢¿ª·¢ËÙ¶È¿ìÇÒÖ´ÐÐÁé»î¡£È«ÊéÒÔʵÓÃΪĿ±êÉè¼Æ£¬ÄÚÈݷḻ£¬°üº¬PHP¿ª·¢×îÖ÷Á÷µÄ¸÷Ïî¼¼Êõ£¬¶Ôÿһ¸ö֪ʶµã¶¼½øÐÐÁËÉîÈëÏêϸµÄ½²½â£¬²¢¸½ÓдóÁ¿µÄʵÀý´úÂ룬ͼÎIJ¢Ã¯¡£´ÓÔËÐл·¾³´î½¨¡¢PHPµÄ»ù±¾Óï·¨ºÍ¹æ·¶ÈëÊÖ£¬ÓÉdzÈëÉѭÐò½¥½ø£¬ÏµÍ³µÄ½éÉÜÁË ......

¡¶Ï¸ËµPHP¡·ÌØÉ«

±¾ÊéµÄ×î´óÌØµãÊÇÈ«²¿Î§ÈÆPHPµÄÃæÏò¶ÔÏó˼ÏëÉè¼Æ±àд£¬Ê¹¶ÁÕß¶ÔÓÚPHP¿ª·¢¼¼Êõ»áÓÐÉî¿ÌµÄÀí½â£¬Ò»²½Ò»²½µØÒýµ¼¶ÁÕß´ÓPHPÃæÏò¹ý³ÌµÄ¿ª·¢Ä£Ê½½øÈëµ½ÃæÏò¶ÔÏóµÄ¿ª·¢Ê±´ú¡£¾ßÌåµÄÌØµã°üÀ¨ÒÔϼ¸¸ö·½Ã棺
 
1.       ÄÚÈÝÈ«Ãæ£¬±àÅźÏÀí
±¾ÊéµÄÄÚÈݷḻ£¬º­¸ÇÁËPHPµÄ¾ø´ó¶àÊý֪ʶµã£¬²¢ÔÚÄ ......

PHPÍøÒ³UTF8±àÂ뿪·¢Öпհ׵ÄÎÊÌâ

¿ª·¢ÖÐһֱû°ì·¨½â¾öµÄÒ»¸öÎÊÌâ
¡¡¡¡Ò³Ãæ²ÉÓÃUTF8±àÂ룬ͷ²¿ºÍβ²¿ÓÃÁËÄ£°å°üº¬ÎļþµÄ·½·¨£¬½á¹ûÍ·²¿ºÍβ²¿Î޶˶˸÷¶à³öÒ»¸öÔ¼10pxµÄ¿Õ
ÐУ¬Ê²Ã´Ò²Ã»ÓС£
¡¡¡¡Ô­ÒòÊÇÈ«²¿²ÉÓÃutf8±àÂ룬°üº¬ÎļþµÄʱºò£¬×îºóµÄ¶þ½øÖÆÁ÷Öаüº¬Á˶à´ÎUTF8
BOM±ê¼Ç£¬IE²»ÄÜÕý³£½âÎö°üº¬¶à¸öUTF8 BOM ±ê¼ÇµÄÒ³Ãæ£¬Ö±½ÓÌæ»»³Éʵ¼ÊÏÔʾµÄ»Ø³ ......

¹ØÓÚphpÐÔÄܵ÷Óŵļ¸Ìõ½¨Òé

×î½üÔÚ´¦ÀíСÓãÉçÇøµÄ¿ª·¢¹ý³Ì£¬Óöµ½³ÌÐòµÄÐÔÄÜÎÊÌ⣬ÔÚ½â¾öÕâ¸öÎÊÌâµÄʱºòÌá³ö¼¸¸ö½¨Ò飺
1¡¢´¦Àíwhile/foreachÖ®ÀàµÄÑ­»·ÒªÌرð×¢Ò⣬ÒòΪÕâ¸öÑ­»·¿ÉÄÜÊǺü¸Ç§´ÎµÄ£¬ËùÒÔÀïÃæµÄÿ¾äÓï¾ä¶¼Òª×¢ÒâÖ´ÐÐËÙ¶È£¬Òª¾«¼ò¡£»¹Óиö²»ºÃµÄϰ¹ßÒ»¶¨Òª×¢Ò⣬²»ÒªÔÚÕâ¸öÖÐд̫³¤µÄ³ÌÐò£¬ÒòΪÕâ¿ÉÄÜÈÃÄãÔÚ¼¸°ÙÐеĴúÂëÖÐÃÔʧ£¬ÂýÂýµØÃÔ ......

PHPÕûÀíÏÔʾÕÕÆ¬exifÐÅÏ¢

<?php
/**
* »ñȡͼÏóÐÅÏ¢µÄº¯Êý
*
* Ò»¸öÈ«Ãæ»ñȡͼÏóÐÅÏ¢µÄº¯Êý
*
* @access public
* @param string $img ͼƬ·¾¶
* @return array
*/
function GetImageInfoVal($ImageInfo,$val_arr) {
    $InfoVal = "δ֪";
    foreach($val_arr as $name=>$val) {
   ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ