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

phpͼƬÉÏ´«

 <?php
if(empty($_GET[submit]))
{
?>
<form enctype="multipart/form-data" action="<?php $_SERVER['PHP_SELF']?>?submit=1" method="post">
<input name="filename" type="file">
<input type="submit" value="È·¶¨ÉÏ´«">
</form>
<?php
}
else{
        $path="uploadfiles/";        //ÉÏ´«Â·¾¶
echo $_FILES["filename"]["type"];
if(!file_exists($path))
{
        //¼ì²éÊÇ·ñÓиÃÎļþ¼Ð£¬Èç¹ûûÓоʹ´½¨£¬²¢¸øÓè×î¸ßȨÏÞ
        mkdir("$path", 0700);
}//END IF
//ÔÊÐíÉÏ´«µÄÎļþ¸ñʽ
$tp = array("image/gif","image/pjpeg","image/png");
//¼ì²éÉÏ´«ÎļþÊÇ·ñÔÚÔÊÐíÉÏ´«µÄÀàÐÍ
if(!in_array($_FILES["filename"]["type"],$tp))
{
        echo "¸ñʽ²»¶Ô";
        exit;
}//END IF
$file2='';
if($_FILES["filename"]["name"])
{
        $file1=$_FILES["filename"]["name"];
  //ÉÏ´«µÄ·¾¶ÎÊÌâ$file2
        $file2 = $path.$file1;
        $flag=1;
}//END IF
if($flag) $result=move_uploaded_file($_FILES["filename"]["tmp_name"],$file2);
//Ìرð×¢ÒâÕâÀï´«µÝ¸ømove_uploaded_fileµÄµÚÒ»¸ö²ÎÊýΪÉÏ´«µ½·þÎñÆ÷ÉϵÄÁÙʱÎļþ
if($result)
{
        //echo "ÉÏ´«³É¹¦!".$file2;
        echo "<script language='javascript'>";
        echo "alert(\"ÉÏ´«³É¹¦£¡\");";
        echo " location='usecar_add.php?pname=$file2'";
        echo "</script>";
}//END IF
}
?>


Ïà¹ØÎĵµ£º

PHP¶þάÊý×éÅÅÐò

 PHP±¾ÉíÊÇÓÐÒ»¸ö¶àάÊý×éÅÅÐòµÄº¯ÊýµÄ¡£
bool
array_multisort
( array
$ar1
[, mixed
$arg
[, mixed
$...
[, array
$...
]]] )
ÏÂÃæÊÇÊֲᵱÖжÔÓÚarray_multisortº¯ÊýµÄÃèÊö£º
array_multisort() ¿ÉÒÔÓÃÀ´Ò»´Î¶Ô¶à¸öÊý×é½øÐÐÅÅÐò£¬»òÕ߸ù¾Ýijһά»ò¶àά¶Ô¶àάÊý×é½øÐÐÅÅÐò¡£
¹ØÁª£¨string ......

PHP½«Í¼Æ¬´æÈëMYSQL

 ÍêÕûµÄʵÏÖÁËPHP½«Í¼Æ¬´æÈëMYSQL
Ç°Ì᣺
 1 Ê×ÏȱØÐëÓµÓÐPHPµÄÔËÐл·¾³£¬ÁíÍ⻹µÃÓÐMYSQLÊý¾Ý¿â
 2 Èç¹ûÎļþ²»ÄÜÉÏ´«³É¹¦Çë¼ì²épicsÊÇ·ñÊÇ¿ÉдµÄȨÏÞ
Ê×ÏÈÏÈ°Ñpic2db.rarÎļþ½âѹµ½PHP¿ÉÒÔÔËÐÐĿ¼Ï¡£
Æä´ÎÔÚMYSQLÖн¨Á¢Ò»¸öÊý¾Ý¿â:pic2db,È»ºóÔÚ¸ÃÊý¾Ý¿âϽ¨Á¢Ò»¸ö±í£¬±í½á¹¹Îª£º
CREATE TABLE `pi ......

PHPÍøÕ¾¿ª·¢·½°¸£¨¿ª·¢ÐÂÈ˱ضÁ£©

 Ò»¡¢¿ª·¢³ÉÔ±
a)ÏîÄ¿Ö÷¹Ü
b)Ò³ÃæÃÀ¹¤
c)Ò³Ã濪·¢
d)·þÎñ¶Ë³ÌÐò¿ª·¢
e)ϵͳÓëÊý¾Ý¹ÜÀí
f)²âÊÔÓë°æ±¾¿ØÖÆ
¶þ¡¢ ÍøÕ¾×鿪·¢¼òÃ÷Á÷³Ì
Èý¡¢ ¿ª·¢¹¤¾ßÓë»·¾³
a)·þÎñÆ÷ÅäÖÃ
i. WEB·þÎñÆ÷£º FreeBSD6.1+Apache2.0+PHP5.0£¬SVN°æ±¾¿ØÖÆ·þÎñ(½ö²âÊÔ»ú)¡£
ii.Êý¾Ý¿â·þÎñÆ÷£º WIN2003 server+SQL server 2000+MySQL5.0 ......

LINUXÏ httpd.conf my.cnf php.iniµÄλÖÃ

 
ĬÈÏ£º
httpd.conf ÔÚ/etc/httpd/conf
my.cnf ÔÚ/etc
php.ini ÔÚ/usr/local/lib
ÔÚUnix ÉÏ£¬php.iniÎļþȱʡ·ÅÔÚ/usr/local/libÉÏÃ棬ÒòΪȱʡµÄ´æ·Å·¾¶ÊÇ<install-path>
/lib£¬µ«ÊÇ¿ÉÒÔÔÚ±àÒëµÄʱºòʹÓÃ--with-config-file-path²ÎÊýÀ´ÐÞ¸Äphp.iniµÄ´æ·ÅλÖã¬ÀýÈçÄã¿ÉÒÔʹÓÃ--with-
config-file-path ......

40Ìõ¼¼ÇÉÓÅ»¯php´úÂë

 ×ªÔØhttp://www.php100.com/html/webkaifa/PHP/PHPyingyong/2009/1115/3523.html
1.Èç¹ûÒ»¸ö·½·¨Äܱ»¾²Ì¬£¬ÄǾÍÉùÃ÷ËûΪ¾²Ì¬µÄ£¬ËٶȿÉÌá¸ß1/4;
2.echoµÄЧÂʸßÓÚprint,ÒòΪechoûÓзµ»ØÖµ£¬print·µ»ØÒ»¸öÕûÐÍ;
3.ÔÚÑ­»·Ö®Ç°ÉèÖÃÑ­»·µÄ×î´ó´ÎÊý£¬¶ø·ÇÔÚÔÚÑ­»·ÖÐ;
4.Ïú»Ù±äÁ¿È¥ÊÍ·ÅÄڴ棬ÌرðÊÇ´óµÄÊý×é;
5.±ÜÃâÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ