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

ÔÚphpÖн«ÉÏ´«·â×°³ÉÀà

ÔÚʹÓÃÉÏ´«Îļþʱ£¬½«ÉÏ´«µÄ´úÂë·â×°³ÉÀ࣬¸üÈÝÒ×·½±ã¡£
 
190.php
<?php
require('upload.php');
if($_POST['submit']){
$a = new Upload();
$File = $a -> uploadfile($ARG=array(
'File'=>array(
'name' => $_FILES['fileDoc']['name'],         //Ô­Ãû×Ö
'tmp_name' => $_FILES['fileDoc']['tmp_name']  //ÐÂÃû×Ö
)));
}
echo $File['oldname'];
?>
<form action="<?echo $PHP_SELF?>" method="post" enctype="multipart/form-data">
<input type="file" name="fileDoc">
<br>
<input type="submit" name="submit" value="ÉÏ´«">
</form>
 
Upload.php
<?php
/**
 * @author  gb2312
 * @since   2009-11-16
 * @desc   ÎļþÉÏ´«
 */
class Upload{
         /**
          * @desc ÎļþÉÏ´«·½·¨
          * @param Array $ARG       ÉÏ´«ÎļþµÄÊôÐÔ
          */
         public function uploadfile($ARG=array(
         'File'  => array(),
         'Dir'   => '')){
                   //ĬÈÏĿ¼
                   $dir = "upload/";
                   //ÎļþԭʼÃû³Æ
                   $oldname = $ARG['File']['name'];
                   //ÎļþÀàÐÍ
 


Ïà¹ØÎĵµ£º

PHPÓëJS È¡ÕûÊý·½·¨int,celi,floor,round

PHPÓëJS---È¡ÕûÊý·½·¨int,celi,floor,round
1.¶ªÆúСÊý²¿·Ö,±£ÁôÕûÊý²¿·Ö
php: intval(7/2)
js:parseInt(7/2)
2.ÏòÉÏÈ¡Õû,ÓÐСÊý¾ÍÕûÊý²¿·Ö¼Ó1
php: ceil(7/2)
js: Math.ceil(7/2)
3,ËÄÉáÎåÈë.
php: round(7/2)
js: Math.round(7/2)
4,ÏòÏÂÈ¡Õû
php: floor(7/2)
js: Math.floor(7/2)
ÒÔÉÏת×Ô:http://hi.baidu ......

phpѧϰ±Ê¼Ç£¨13£©:PHP+MYSQL¼òµ¥·ÖÒ³

conn.php
<?php
/*
 * Created on 2010-1-6
 * Author:CHAUVET
 * Function:Á¬½Ó×Ö·û´®
 */
 $conn=@mysql_connect("localhost","root","")or die("Á¬½ÓÊý¾Ý¿â³ö´í£¡");
 mysql_select_db("newdb",$conn);
 mysql_query("set names 'gb2312'");
 function ReplaceSom ......

Phpѧϰ±Ê¼Ç

·¢±íÓÚ2008Äê10ÔÂ14ÈÕ
PHP»ù´¡£º±êǩʹÓãº
PHP´úÂë±ØÐë°üº¬ÔÚ <?PHP ºÍ ?>Ö®¼ä¡£
һЩÆäËûµÄ±êÇ©ÑùʽҲ¿ÉÒÔʹÓ㬱ÈÈç<?,<%,»òÕß<script  language="php">(Js±êÇ©)¡£
ÆäËû±êÇ©¿ÉÒÔÊÇÓ㬵«Ö»ÓÐÔÚ<?php £¿>Ö®¼äµÄ½Å±¾²ÅÊÇ¿ÉÓõÄPHP´úÂë¡£
£¨¹ØÓÚlesson 23 µÄphp.iniÅäÖÃÎļþ£©
¿ªÊ ......

ÕýÔò±í´ïʽÔÚphp£¬java£¬javascriptÖзֱðÓ¦ÓÃ

ÔÚjavascriptÖÐÓ÷¨¾ÙÀý
var rule = /^\d+$/;
if(!rule.test(addform.rmb_price.value)) {
alert('rmb_price must be number');
addform.rmb_price.focus();
return false;
}
ÔÚphpÖÐÓ÷¨¾ÙÀý
$aa = "/^\d+$/";
if(preg_match($aa, "111")) {
echo "found";
}
ÔÚjavaÖÐÓ÷¨¾ÙÀý ......

ÓÃPHP¿ªÊ¼ÄãµÄMVC(Èý)ʵÏÖÄãµÄModel²ã ÊÕ²Ø


http://blog.csdn.net/hahawen/archive/2004/05/01/20692.aspx
Èý¡¢ÊµÏÖÄãµÄMode²ã
Model²ã£¬¾ÍÊÇMVCģʽÖеÄÊý¾Ý´¦Àí²ã£¬ÓÃÀ´½øÐÐÊý¾ÝºÍÉÌÒµÂß¼­µÄ×°·â£¬½øÐÐËûµÄÉè¼ÆµÄʱºòÉè¼Æµ½Èý¸ö¸ö¸ÅÄî:
------ModelÀà¡£ÊÇʵÌåÀà¡£ÓÃÀ´±£´æÊý¾Ý¿â±í¸ñµÄÖÐÒ»Ìõ¼Ç¼µÄËùÓÐ×ֶεÄÊý¾Ý¡£²¢ÇÒ¿ÉÒÔÑéÖ¤ÕâÌõ¼Ç¼Êý¾ÝµÄÍêÕûÐÔ¡£
------ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ