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

phpÎļþÉÏ´«¼òµ¥Ê¾Àý

<?php
/*
Å׸öש£¬¾ßÌåÒª×ö³ÉʲôÑù×Ô¼º×ö¡£
*/
if(isset($_FILES['userfile']['tmp_name'])){
$userfile = $_FILES['userfile']['tmp_name']; //±£´æÔÚϵͳµÄÁÙʱλÖÃ
$userfile_name = $_FILES['userfile']['name'];//ÎļþÃû
$userfile_size = $_FILES['userfile']['size'];//Îļþ´óС£¬×Ö½Ú
$userfile_type = $_FILES['userfile']['type'];//ÎļþÀàÐÍ
if(!is_dir("image")) mkdir ("image", 0700);
$upfile = "image/".$userfile_name;//±£´æλÖÃ
print_r($_FILES);
//move_uploaded_file($userfile,$upfile);//·½·¨1
if(!copy($userfile,$upfile))//·½·¨2
{
echo "ÉÏ´«Ê§°Ü";
exit();
}
echo "ÉÏ´«³É¹¦";
echo "<a href=\"#\" onClick=\"window.history.back();\">ÔÙÉÏ´«Ò»ÕÅ</a>";
}
else{
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>ÎÞ±êÌâÎĵµ</title>
</head>
<body>
<form action="" method="post" enctype="multipart/form-data" name="form1">
  <input name="MAX_FILE_SIZE" type="hidden" id="MAX_FILE_SIZE" value="1000">
  <input name="userfile" type="file" id="userfile">
  <input type="submit" name="Submit" value="ÉÏ´«">
</form>
</body>
</html>
<?php }?> 
http://blog.chinaunix.net/u/24375/showart_187025.html


Ïà¹ØÎĵµ£º

Éý»ªÌṩÖÕÉíÃâ·ÑASP+access PHP+mysqlÐéÄâÖ÷»ú

Éý»ªÌṩÖÕÉíÃâ·ÑASP+access PHP+mysqlÐéÄâÖ÷»ú
Ò»£ºÉý»ªÍøÂç¿Æ¼¼ÓÐÏÞ¹«Ë¾,ÓëÉý»ªÍ¬ÔÚÕ¾³¤ÖÕÉíÃâ·Ñ¿Õ¼ä·ö³Ö¼Æ»®.
1¡¢×ð¾´µÄÓû§ÄúºÃ,Ò²ÐíÄú»¹ÔÚΪÿÄêÒ»½»µÄ¿Õ¼ä·ÑÓ÷¢³î,Ò²ÐíÄúÏë»ñµÃÒ»¸ö¸üÓÅÖʵĿռäÈ´²»ÏëͶÈëÌ«¶à,´ÓÏÖÔÚÆð ÕâЩÎÊÌ⽫ӭÈжø½â→Éý»ªÍøÂç←ÓëÉý»ªÍ¬ÔÚÕ¾³¤·ö³Ö¼Æ»®È«ÃæÆô¶¯¡£
2¡¢Ã»ÓÐ×¢²á¹«Ë¾ ......

PHP³Á˼¼֮¹¤×÷Ä£ÐÍ

PHP³Á˼¼
¡¡¡¡¹¤×÷Ä£ÐÍ
¡¡¡¡PHPµÄ¹¤×÷Ä£Ðͷdz£ÌØÊâ¡£´ÓijÖ̶ֳÈÉÏ˵£¬PHPºÍASP¡¢ASP.NET¡¢JSP/ServletµÈÁ÷ÐеÄWeb¼¼Êõ£¬ÓÐ×ű¾ÖÊÉϵÄÇø±ð¡£
¡¡¡¡ÒÔJavaΪÀý£¬JavaÔÚWebÓ¦ÓÃÁìÓò£¬ÓÐÁ½ÖÖ¼¼Êõ£ºJava ServletºÍJSP£¨Java Server Page£©¡£Java ServletÊÇÒ»ÖÖÌØÊâÀàÐ͵ÄJava³ÌÐò£¬Ëüͨ¹ýʵÏÖÏà¹Ø½Ó¿Ú£¬´¦ÀíWeb·þÎñÆ÷·¢Ë͹ ......

Ê®Ììѧ»áphpÖ®µÚ¶þÌì

ѧϰĿµÄ£ºÕÆÎÕphpµÄÁ÷³Ì¿ØÖÆ
¡¡¡¡1¡¢if..else Ñ­»·ÓÐÈýÖֽṹ
¡¡¡¡µÚÒ»ÖÖÊÇÖ»ÓÐÓõ½ if Ìõ¼þ£¬µ±×÷µ¥´¿µÄÅжϡ£½âÊÍ³É "Èô·¢ÉúÁËijÊÂÔòÔõÑù´¦Àí"¡£Óï·¨ÈçÏ£º
¡¡¡¡if (expr) { statement }
¡¡¡¡ÆäÖÐµÄ expr ΪÅжϵÄÌõ¼þ£¬Í¨³£¶¼ÊÇÓÃÂß¼­ÔËËã·ûºÅµ±ÅжϵÄÌõ¼þ¡£¶ø statement Ϊ·ûºÏÌõ¼þµÄÖ´Ðв¿·Ö³ÌÐò£¬Èô³ÌÐòÖ»ÓÐÒ»ÐÐ ......

Ê®Ììѧ»áphpÖ®µÚ¾ÅÌì

 Ñ§Ï°Ä¿µÄ£º×¢ÒâÊÂÏî
¡¡¡¡ÒòΪÎÒÊÇÏÈѧASPµÄ£¬ËùÒÔÔÙ×öPHPµÄʱºò»á·¢ÏֺܶàµØ·½ÐèÒªÊÊÓ¦¡£
¡¡¡¡1¡¢×¢ÒⲻҪ©ÁË·ÖºÅ
¡¡¡¡2¡¢×¢ÒⲻҪ©Á˱äÁ¿Ç°µÄ$
¡¡¡¡3¡¢Ê¹ÓÃSESSIONµÄʱºò×¢Òâ²»ÒªÒÅ©session_start();
¡¡¡¡Èç¹û·¢Éú´íÎóµÄʱºò£¬¿ÉÒÔ²ÉÓÃÒÔÏ·½·¨£º
¡¡¡¡1¡¢Èç¹ûÊÇSQLÓï¾ä³ö´í£¬¾Í×¢ÊÍÁËÈ»ºóÊä³öSQLÓï¾ä£¬×¢Òâ ......

phpÐÂÎÅÄÚÈÝ·ÖҳʵÀý£¨smarty Ä£°å£©

ÏîÄ¿ÐèÒªÓõ½ ÐÂÎÅÄÚÈÝÒ³ ʵÏÖ·ÖÒ³¹¦ÄÜ£¬Ëæ±ãдÁËһϡ£
¸ø´ó¼Ò×ö¸ö²Î¿¼£¬Ð´µÄ²»ºÃ»¹ÍûÁ½Ⱑ£¡
//ÐÂÎÅÄÚÈÝ·ÖÒ³¿ªÊ¼ The page next for news content start
$nextpage="<!--{nextpage}-->";//·ÖÒ³±êʾ.
$content=explode($nextpage,$content);
$sum=count($content);
$mpurl=$_SERVER['PHP_SELF']."?newsid ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ