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

php»ñȡԭͼƬ

<?php
/*
»ñȡԶ³ÌͼƬº¯Êý
*/
function GrabImage($url,$filename=""){
//ÈôurlΪ¿Õ·µ»Øfalse£¬ÎÞµØÖ·
if($url=="") return false;
//Èô$filenameΪ¿Õ
if($filename=="") {
$ext=strrchr($url,"."); //»ñÈ¡"."¼Óºó׺
if($ext!=".gif"&&$ext!=".jpg"&&$ext!=".png") return false;
$filename=date("YmdHis").$ext;
}
ob_start();
readfile($url);
$img = ob_get_contents();
ob_end_clean();
$size = strlen($img);
$fp2=@fopen($filename,"a");
fwrite($fp2,$img);
fclose($fp2);
return $filename;
}
$img=GrabImage("http://www.google.com/intl/en_ALL/images/logo.gif","logo.gif");
if($img){
echo '<img src="'.$img.'" mce_src="'.$img.'">';
}else{
echo "false";
}
?>


Ïà¹ØÎĵµ£º

PHPÖлù±¾·ûºÅ¼°Ê¹Ó÷½·¨

// µ¥ÐÐ×¢½â
/* */ ¶àÐÐ×¢½â
ÒýºÅµÄʹÓÃ
’ ’ µ¥ÒýºÅ,ûÓÐÈκÎÒâÒå,²»¾­Èκδ¦ÀíÖ±½ÓÄùýÀ´;
" "Ë«ÒýºÅ,php¶¯Ì¬´¦ÀíÈ»ºóÊä³ö,Ò»°ãÓÃÓÚ±äÁ¿. 
±äÁ¿ÐÎ̬:
Ò»ÖÖÊÇTrue ¼´ ÕæµÄ;
ÁíÒ»ÖÖÊÇFalse ¼´¼ÙµÄ
³£¼û±äÁ¿ÐÎ̬:
string ×Ö´®(Êý×Ö\ºº×Ö\µÈµÈ)
integer ÕûÊý(1¡¢2¡¢3¡¢4¡¢5¡¢0¡¢-1¡¢-2¡¢µÈµ ......

ÓÃPHP×ö¸öÈ˲ÅÕ¾

  ×î½üÓÐÈËÔÚÕбêÒª×ö¸öÏñ£ºwww.webjianzhi.com ÕâÑùµÄÈ˲ÅÕ¾£¬³õ¿´£¬Õâ¸öÍøÂç¼æÖ°Íø£¬½çÃæ»¹ÊDZȽÏÇåÎúµÄ¡£
 ÕûÌå·ÖÎöÁËһϣ¬Ò»¸öÐÂÎÅÎÄÕ·¢²¼ÏµÍ³£¬Õâ¸ö²»ÊǺÜÄÑ£¬ÁíÒ»¸ö¾ÍÊÇ×ֶε÷ÓÃϵͳ£¬¾ÍÊÇÊ×Ò³µÄÖ°Òµ½éÉÜ£¬¼æÖ°ÈËÆø£¬µÄÕâЩµ÷Óá£
 ÁíÒ»¸ö¾ÍÊÇ»áÔ±·¢²¼ÏµÍ³¡£
  Õû¸öÓñí¸ñ²¼¾Ö£¬ÃÀ¹¤Éϲ»´æÔ ......

PHPµÄheader()תÏòʧ°ÜµÄÒ»¸öÔ­Òò

header()º¯ÊýÓÃÀ´×ªÏò(redirect page)ʱ£¬Èç¹ûµ÷ÓÃǰÓÐÊä³ö£¬±ÈÈçecho»òhtml±êÇ©£¬¾Í»áתÏòʧ°Ü¡£
Èç¹ûµ÷ÓÃǰÓпÕÐÐÒ²»áתÏòʧ°Ü¡£
»¹ÓÐÒ»¸öÔ­Òò£¬¾ÍÊÇ×¢ÒâÄãµÄphpÎļþµÄ×Ö·û±àÂë¡£ÎÒÓöµ½µÄÇé¿öÊÇ£¬µ±×Ö·û±àÂëΪUTF-8ʱ£¬×ªÏòʧ°Ü£¬¸ÄΪANSIʱ³É¹¦¡£¾ßÌåÔ­Òò²»Ã÷£¬½ö¹©²Î¿¼¡£ ......

Ò»¿îphp µÄmvc ¿ªÔ´¿ò¼Üopenbiz

¿´µ½Í¬Ñ§ÃÇÓв»ÉÙÔÚÓÃphp¿ª·¢ÏîÄ¿µÄ£¬»òÐíÏÂÃæµÄ×ÊÁ϶Դó¼ÒÓÐÓðɣ¬ÓÃÀ´Ñ§Ï°Ò»ÏÂÒ²ºÃ¡£
ÊÕ¼¯µÄ×ÊÁÏÏà¹ØµØÖ·£º
 
cubi demo site£ºhttp://dev.openbiz.cn/cubi/user/login
openBiz app cubi£ºhttp://docs.google.com/View?id=df5ktjv9_64f9fd88gf
openbiz architecture overview:   
  http: ......

PHPºǫ́³ÌÐò¶ÔLINUXÐźŵĴ¦Àí

PHPÔÚÔËÐеÄʱºò£¬Ö±½Ókillµô£¬ÓпÏÄÜÔì³ÉÊý¾ÝµÄ¶ªÊ§¡£ÐÒºÃphpÄ£¿é£¬ÓÐÕë¶ÔsignalµÄ´¦Àí¡£
´¦Àí·½Ê½£¬Ê×Ïȼì²éÓÐûÓа²×° PCNTL Ä£¿é
È»ºó¿ÉÒÔÔÚÒ»¸ö°üº¬ÎļþÖУ¬Ìí¼ÓÒÔÏ´úÂë
global $exitFlag;
$exitFlag = false;
// Ôö¼ÓlinuxÐźÅÁ¿´¦Àí
if (DIRECTORY_SEPARATOR != '\\') {
    pcntl_signal(SI ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ