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

php ËõÂÔͼº¯Êý

function getThumbs($filename,$savepath,$d_w,$d_h,$b,$img_name)
{
    if($b)
    {
        $photourl = $savepath."/".$img_name;
    }else
    {
        $photourl = $savepath;
    }
    $width = $d_w;
    $height= $d_h;
    list($width_orig, $height_orig,$image_type) = getimagesize($filename);
    $extends = $image_type == 1 ? "gif" : "jpg";
    $x = 0;$y = 0;
    if($d_w==$d_h)
    {
        if ($width && ($width_orig < $height_orig))
        {
            $height = ($width / $width_orig) * $height_orig;
            $y      = round(($height-$d_h)/2);
        } else
        {
            $width  = ($height / $height_orig) * $width_orig;
            $x      = round(($width-$d_w)/2);
        }
    }else
    {
        if($d_h>$d_w)
        {
            $width  = ($height / $height_orig) * $width_orig;
            //                $x      = round(($width-$d_w)/2);
        }else
        {
            $height = ($wi


Ïà¹ØÎĵµ£º

PHP һЩ֪ʶ

1.È¡µÃµ±Ç°ÄÚ´æÊ¹ÓôóС£ºmemory_get_usage()
2.¼ÆËãÖ´ÐÐʱ¼ä£ºmicrotime(true)
3.ÉèÖÃscriptÖ´ÐÐʱ¼äÏÞÖÆset_time_limit
4.ÉèÖÃÄÚ´æÏÞÖÆini_set("memory_limit","256M");
3.´ÓÔ¶³ÌÏÂÔØÎļþµÄÁ½¸ö·½·¨£º
$contents=file_get_contents("http://www.govtrack.us/data/us/gis/zip4dist-prefix.t ......

PHPµ÷Óô洢¹ý³Ì³¬Ê±½â¾ö·½·¨


×î½ü¹¤×÷ÖÐÓöµ½Ò»¸öÍ·ÌÛµÄÎÊÌâ:phpÖе÷ÓÃÒ»¸ö´æ´¢¹ý³Ì(Òª¸´ÖÆN¶àÊý¾ÝµÄ.),ÓÉÓڴ˹ý³ÌÖ´ÐÐʱ¼äºÜ³¤.µ¼ÖÂphp×ÜÊdz¬Ê±´íÎó:
Service Temporarily Unavailable
The
server is temporarily unable to service your request due to maintenance downtime
or capacity problems
.
Please
try
again
later
.
ÎÊÌ ......

ºÃÓÃµÄ xmlrpc epi PHP ·â×°Àà


ÔÚ PHP Öб¾Éí´øÓÐÒ»¸öÓà C ÓïÑÔʵÏÖµÄ xmlrpc À©Õ¹£¬½Ð
xmlrpc-epi¡£ÒòΪËüÊÇÓà C ÓïÑÔʵÏֵģ¬ËùÒÔ´ÓËÙ¶ÈÉÏÀ´Ëµ±ÈÓà PHP ʵÏÖµÄÄÇЩ xmlrpc
À©Õ¹Òª¿ìµÄ¶à¡£µ«ÊÇÔÚʵ¼ÊÓ¦ÓÃÖÐÈ´·¢ÏÖºÜÉÙÓÐÈËÓÃÕâ¸öÀ©Õ¹£¬´ó¶¼ÊÇÓà PHP ½Å±¾ÊµÏÖµÄ xmlrpc
µÄÀ©Õ¹¡£Ô­Òò¿ÉÄÜÓÐÒÔÏÂÁ½µã£ºÒ»ÊÇÕâ¸öÀ©Õ¹ÐèÒªÔÚ·þÎñÆ÷ÉÏ´ò¿ª£¬Èç¹ûûÓзþÎñÆ÷² ......

php µ÷ÓÃ sudo ²»Ö´ÐÐÎÊÌâ

´úÂë
//µÚÒ»ÖÖ·½Ê½
exec($cmd,$str,$result);
echo "result = $result <br/>";
if ($result != 0) {
    echo "failed";
}
print_r($str);
#ûÓÐÊä³ö½á¹û
//µÚ¶þÖÖ·½Ê½
$output = shell_exec("/usr/bin/sudo /usr/bin/whoami 2>&1);
echo "output = ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ