phpÎļþÉÏ´«´úÂë
<html>
<head><title>ÎļþÉÏ´«</title></head>
<body alink="#FF0000" link="#000099" vlink="#CC6600" topmargin="8" leftmargin="0" bgColor="#FFFFCC">
<?php
if(!$_POST['upload'])
{
?>
<form enctype="multipart/form-data" action="upload.php" method="post">
<br><br><br><br>
<table cellspacing=0 bordercolordark=#FFFFFF width="60%" bordercolorlight=#000000 bgcolor=#FFFFFF border=1 align="center" cellpadding="2">
<tr bgcolor="#6b8ba8" style="color:FFFFFF">
<td width="100%" align="center" valign="bottom" height="19" colspan="2">ÎÄ ¼þ ÉÏ ´«</td>
</tr>
<tr>
<td width="30%" align="right" height="19"><font size=3>ÎļþλÖãº</font></td>
<td width="70%"><input type="file" name="upload_file" size="30"></td>
</tr>
<tr>
<td width="100%" align="center" colspan="2"><input type="submit" name="upload" value="ÉÏÔØÎļþ"></td>
</tr>
</table>
</form>
<?php
}else
{
$upload_file=$_FILES['upload_file']['tmp_name'];
$upload_file_name=$_FILES['upload_file']['name'];
if(empty($upload_file_name))
{?>
<script language="javascript">
window.alert("ÉÏ´«ÎļþΪ¿Õ£¡ÇëÄúÖØÐÂÑ¡ÔñÒªÉÏ´«Îļþ¡£");
//location.href="upload.php";
//window.history.go(-1); //-1±íʾ·µ»Ø£¬0±íʾˢб¾Ò³£¬1±íʾǰ½øµÈµÈ
window.history.back();
</script>
<?}
if($upload_file)
{
$file_size_max = 6000*6000; // 1MÏÞÖÆÎļþÉÏ´«×î´óÈÝÁ¿(bytes)
$store_dir = "d:/"; // ÉÏ´«ÎļþµÄ´¢´æλÖ㨿ÉÒÔÈÎÒâÐÞ¸ÄΪÄúÒªÉÏ´«Î»Öã©
$accept_overwrite = 1;//ÊÇ·ñÔÊÐí¸²¸ÇÏàͬÎļþ
// ¼ì²éÎļþ´óС
if ($upload_file_size > $file_size_max)
{
echo "¶Ô²»Æð£¬ÄãµÄÎļþÈÝÁ¿´óÓڹ涨";
exit;
}
// ¼ì²é¶ÁдÎļþ
if (file_exists($store_dir . $upload_file_name) && !$accept_overwrite) {
Echo "´æÔÚÏàͬÎļþÃûµÄÎļþ";
exit;
}
//¸´ÖÆÎļþµ½Ö¸¶¨Ä¿Â¼
if (!move_uploaded_file($upload_file,$store_dir.$upload_file_name))
Ïà¹ØÎĵµ£º
ºÜÈÙÐÒÉÏƪÎÄÕ±»°æÖ÷ÍƼöµ½Ê×Ò³ÁË£¬ÐÄÀïËãÊǼ¤¶¯ÁËÒ»°Ñ£¬¼ÌÐøŬÁ¦Ñ§Ï°Öаɡ£±¾ÕÂÖ÷Òª½éÉÜPHPÖеıäÁ¿¡£Ö÷Òª°üÀ¨£ºÔ¤¶¨Òå±äÁ¿¡¢±äÁ¿·¶Î§¡¢¿É±ä±äÁ¿ÒÔ¼°PHPµÄÍⲿ±äÁ¿µÈ¡£
Ò»¡¢»ù´¡ÖªÊ¶
PHP ÖÐÒ»¸öÃÀÔª·ûºÅºóÃæ¸úÉÏÒ»¸ö±äÁ¿Ãû³Æ£¬¼´±íʾһ¸ö±äÁ¿¡£±äÁ¿µÄÃû³ÆÊǶԴóСдÃô¸ÐµÄ¡£
±äÁ¿ÃûÓë PHP ÖÐÆäËüµÄ±êÇ©Ò»Ñù×ñÑÏàͬµÄ ......
±í´ïʽÊÇ PHP ×îÖØÒªµÄ»ùʯ¡£ÔÚ PHP ÖУ¬¼¸ºõÄãËùдµÄÈκζ«Î÷¶¼ÊÇÒ»¸ö±í´ïʽ¡£¼òµ¥µ«È´×ȷµÄ¶¨ÒåÒ»¸ö±í´ïʽµÄ·½Ê½¾ÍÊÇ“anything that has a value”¡£
×î»ù±¾µÄ±í´ïʽÐÎʽÊdz£Á¿ºÍ±äÁ¿¡£µ±Äã¼üÈë“$a = 5”£¬¼´½«Öµ '5' ·ÖÅä¸ø±äÁ¿ $a¡£'5'£¬ºÜÃ÷ÏÔ£¬ÖµÎª 5£¬»»¾ä»°Ëµ '5' ÊÇÒ»¸öֵΪ5µÄ±í´ïʽ£ ......
1.Èç¹ûÒ»¸ö·½·¨¿É¾²Ì¬»¯£¬¾Í¶ÔËü×ö¾²Ì¬ÉùÃ÷¡£ËÙÂÊ¿ÉÌáÉýÖÁ4±¶¡£
2.echo ±È print ¿ì¡£
3.ʹÓÃechoµÄ¶àÖزÎÊý£¨Òë×¢£ºÖ¸ÓöººÅ¶ø²»ÊǾäµã£©´úÌæ×Ö·û´®Á¬½Ó¡£
4.ÔÚÖ´ÐÐforÑ»·Ö®Ç°È·¶¨×î´óÑ»·Êý£¬²»ÒªÃ¿Ñ»·Ò»´Î¶¼¼ÆËã×î´óÖµ¡£
5.×¢ÏúÄÇЩ²»ÓõıäÁ¿ÓÈÆäÊÇ´óÊý×飬ÒÔ±ãÊÍ·ÅÄÚ´æ¡£
6.¾¡Á¿±ÜÃâʹÓÃ__get£¬__set£¬__auto ......
²âÊÔ£ºhttp://www.yincode.com
Óû§£ºtest1 test2 test3
ÃÜÂ룺123456
=======================================
2010/01/12/18:54:24
=======================================
¹È¸èä¯ÀÀÆ÷ä¯ÀÀ²»Õý³£
main.js
function getData(u,m,callBack){
var ru=u+"&r="+Math.random();
$(" ......
__autoload($classname){
}
µ±PHPÕÒ²»µ½ÀàÎļþ»áµ÷ÓÃÕâ¸ö·½·¨£¬µ±×¢²áÁË×Ô¼ºµÄº¯Êý»ò·½·¨Ê±£¬PHP²»»áµ÷ÓÃ__autoload()º¯Êý£¬¶ø»áµ÷ÓÃ×Ô¶¨ÒåµÄº¯Êý
spl_autoload_register('func_name');
spl_autoload_register(array('class_name','method_name')); ......