Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 define('__TYPECHO_ROOT_DIR__', dirname(__FILE__));
define('__TYPECHO_PLUGIN_DIR__', '/usr/plugins');
@set_include_path(get_include_path() . PATH_SEPARATOR . __TYPECHO_ROOT_DIR__ . '/var' . PATH_SEPARATOR . __TYPECHO_ROOT_DIR__ . __TYPECHO_PLUGIN_DIR__);
ÄÜÏêϸµÄ½âÊÍÕâ¸öº¯ÊýÂ𣿵±È»Î ......

PHP

 PHPÕ¾µãµÄÔÚÏ߽̳ÌÒѾ­ºÜ°ôÁË¡£ÔÚÄÇÀﻹÓÐһЩÆäËû½Ì³ÌµÄÁ´½Ó¡£¶ø±¾Îĵĸò¿·Ö½«ÈÃÄã¶ÔPHPÊìϤһµã¡£ÎÒ²»¿ÉÄÜ×öµ½Ã»ÓÐÈκÎÒÅ©£¬ÎÒµÄÄ¿µÄÖ»ÔÚÓÚÄÜÈÃÄãѸËÙ¿ªÊ¼ÄãµÄPHP±à³Ì¡£
2.1 Ê×ÒªÌõ¼þ
ÄãÊ×ÏȱØÐëÒªÓÐÒ»¸öÕýÔÚ¹¤×÷×ŵÄÖ§³ÖPHPµÄweb·þÎñÆ÷¡£ÎÒ¼Ù¶¨ÔÚÄãµÄ·þÎñÆ÷ÉÏËùÓÐPHPÎļþµÄÀ©Õ¹ÃûΪ.php3¡£
2.2 PHPµÄ°²×°
Éú ......

php^

  PHPÊÇÒ»ÖÖÓÃÓÚ´´½¨¶¯Ì¬WEBÒ³ÃæµÄ·þÎñ¶Ë½Å±¾ÓïÑÔ¡£ÈçͬASPºÍColdFusion£¬Óû§¿ÉÒÔ»ìºÏʹÓÃPHPºÍHTML±àдWEBÒ³Ãæ£¬µ±·ÃÎÊÕßä¯ÀÀµ½¸ÃÒ³ÃæÊ±£¬·þÎñ¶Ë»áÊ×ÏȶÔÒ³ÃæÖеÄPHPÃüÁî½øÐд¦Àí£¬È»ºó°Ñ´¦ÀíºóµÄ½á¹ûÁ¬Í¬HTMLÄÚÈÝÒ»Æð´«Ë͵½·ÃÎʶ˵Ää¯ÀÀÆ÷¡£µ«ÊÇÓëASP»òColdFusion²»Í¬£¬PHPÊÇÒ»ÖÖÔ´´úÂ뿪·Å³ÌÐò£¬ÓµÓÐºÜºÃµÄ¿çÆ½Ì¨¼ ......

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 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ