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±¾ÉíÊÇÓÐÒ»¸ö¶àάÊý×éÅÅÐòµÄº¯ÊýµÄ¡£
bool
array_multisort
( array
$ar1
[, mixed
$arg
[, mixed
$...
[, array
$...
]]] )
ÏÂÃæÊÇÊֲᵱÖжÔÓÚarray_multisortº¯ÊýµÄÃèÊö£º
array_multisort() ¿ÉÒÔÓÃÀ´Ò»´Î¶Ô¶à¸öÊý×é½øÐÐÅÅÐò£¬»òÕ߸ù¾Ýijһά»ò¶àά¶Ô¶àάÊý×é½øÐÐÅÅÐò¡£
¹ØÁª£¨string ......
ÕâÊÇÎÒдµÄµÚÒ»¸ö¼ÆÊýÆ÷
<?
$s_ht="127.0.0.1";
$s_user="root";
$s_pas="123456";
$s_data="ceshi";
if (empty($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$myip = $_SERVER['REMOTE_ADDR'];
$myip = $_SERVER['REMOTE_ADDR'];
}
else {
$myip = explode(',', $_SERVER['HTTP_X_FORWA ......
1.PHP±à³ÌÄÜÁ¦
2.MysqlÄÜÁ¦
A.Á˽⣺֪µÀʹÓÃPHPÁ´½ÓÊý¾Ý¿â£»¶®µÃһЩ¼òµ¥µÄSQL;½¨Á¢Ò»Ð©¼òµ¥µÄË÷Òý£»¶®µÃÓù¤¾ß¼òµ¥²Ù×÷Ò»ÏÂÊý¾Ý¿â£¨Ôöɾ¸Ä²éÊý¾Ý±í½á¹¹£©¡£
B.ÊìϤ£º¶®µÃÔÚ¿ª·¢Ó¦ÓÃÉÏÉè¼ÆÊý¾Ý¿â£¬½¨Á¢Ò»Ð©ÓÐЧµÄË÷Òý£¬ÓÃexplain·ÖÎöSQLÐÔÄÜ£¬Ñ¹Á¦²âÊԵȵȡ£
C.ºÜÊìϤ£ºÉîÈëÁ˽âÊý¾Ý¿âË÷Òý£¬´æ´¢ÒýÇæÔÀíÒÔ¼°ÔËÐлúÖÆ£ ......
Ò»¡¢¿ª·¢³ÉÔ±
a)ÏîÄ¿Ö÷¹Ü
b)Ò³ÃæÃÀ¹¤
c)Ò³Ãæ¿ª·¢
d)·þÎñ¶Ë³ÌÐò¿ª·¢
e)ϵͳÓëÊý¾Ý¹ÜÀí
f)²âÊÔÓë°æ±¾¿ØÖÆ
¶þ¡¢ ÍøÕ¾×鿪·¢¼òÃ÷Á÷³Ì
Èý¡¢ ¿ª·¢¹¤¾ßÓë»·¾³
a)·þÎñÆ÷ÅäÖÃ
i. WEB·þÎñÆ÷£º FreeBSD6.1+Apache2.0+PHP5.0£¬SVN°æ±¾¿ØÖÆ·þÎñ(½ö²âÊÔ»ú)¡£
ii.Êý¾Ý¿â·þÎñÆ÷£º WIN2003 server+SQL server 2000+MySQL5.0 ......
Ö»ÊÇ˼·,»¹Ã»ÑéÖ¤. ÓÃWindowsµÄ¼Æ»®ÈÎÎñÿ¸ôÒ»¸öСʱÔËÐÐÒ»¸öphp½Å±¾. ¸Ãphp½Å±¾»á½«°ë¸öСʱºòÒªÖ´ÐеÄPHP´úÂëдÈëÒ»¸ö¹Ì¶¨µÄphpÎļþÖÐ. Óõڶþ¸ö¼Æ»®ÈÎÎñÔÚµÚÒ»¸ö¼Æ»®ÈÎÎñÖ´Ðкó°ë¸öСʱ,Ö´ÐÐÉÏÃæµÄ¹Ì¶¨µÄphpÎļþ. ʵ¼ÊÇé¿öµÈÓпÕʵÑéºóÔÙ˵. ......