Ò»¸ö×Ô¶¯¸ù¾ÝͼƬÎļþÀàÐÍ´ò¿ªÍ¼Æ¬µÄPHPº¯Êý
ÔÚPHP.netµÄÅ£È˻ظ´ÖÐÕÒµ½Ò»¸ö×Ô¶¯¸ù¾ÝͼƬÎļþÀàÐÍ´ò¿ªÍ¼Æ¬µÄPHPº¯Êý,ºÜ·½±ã.
/**
*
* Loads a file based on its filetype and returns false if it fails.
*/
function imagecreatefromfile($path, $user_functions = false)
{
$info = @getimagesize($path);
if(!$info)
{
return false;
}
$functions = array(
IMAGETYPE_GIF => 'imagecreatefromgif',
IMAGETYPE_JPEG => 'imagecreatefromjpeg',
IMAGETYPE_PNG => 'imagecreatefrompng',
IMAGETYPE_WBMP => 'imagecreatefromwbmp',
IMAGETYPE_XBM => 'imagecreatefromwxbm',
);
if($user_functions)
{
$functions[IMAGETYPE_BMP] = 'imagecreatefrombmp';
}
if(!$functions[$info[2]])
{
return false;
}
if(!function_exists($functions[$info[2]]))
{
return false;
}
return $functions[$info[2]]($path);
}
Ïà¹ØÎĵµ£º
phpÖÐÈÕÆÚת»»º¯ÊýstrtotimeµÄÓ÷¨:
Óï·¨:
int strtotime ( string time [, int now] )
·µ»Ø½«ÈκÎÓ¢ÎÄÎı¾µÄÈÕÆÚʱ¼äÃèÊö½âÎöΪ Unix ʱ¼ä´Á
ʵÀý:
Ò»£¬»ñȡָ¶¨ÈÕÆÚµÄunixʱ¼ä´Á strtotime("2009-1-22") ʾÀýÈçÏ£º
echo strtotime("2009-1-22") ½á¹û£º1232553600
˵Ã÷£º·µ»Ø2009Äê1ÔÂ22ÈÕ0µã ......
ʹÓõÄÊÇADODB¿â,ÐèÒªÓÐOCI8¿â.
<?php
//require("adodb5/adodb-exceptions.inc.php");
require("adodb5/adodb.inc.php");
$conn = NewADOConnection("oci8");
$conn->Connect($url, $user, $password, $service_name);
$rs;
try {
$rs = $conn->Execu ......
֮ǰŪphpµÄʱºò£¬ÐèÒªÂ¼ÖÆÆÁÄ»£¬¾ÍÊÇÓÃphp×Ô´øµÄemailº¯Êý·¢ÐÅ£¬ÒòΪûÓÐ×Ô¼ºÅª¹ýsmtpµÄ ·þÎñÆ÷£¬ÍøÉÏÌṩµÄsmtp·þÎñÆ÷¶¼ÊÇÐèҪʹÓÃÃÜÂëÈÏÖ¤ µÄ£¬Æ«Æ«phpÄÚÖõĺ¯Êý¾ÍûÓÐÌṩÉí·ÝÈÏÖ¤£¬Ò²¾Íµ¼ÖÂÁ˱ØÐëÐèÒªÔÚ×Ô¼ºµÄµçÄԴһ¸ö¿ÉÒÔ×ÔÖ÷·¢ÐŵÄmail·þÎñÆ÷£¡
È»ºó ......
Ò».HTMLÒ³Ãæ×ªUTF-8±àÂëÎÊÌâ
1.ÔÚ<head>ºó£¬<title>ǰ¼ÓÈëÒ»ÐУº
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
˳Ðò²»ÄÜ´í£¬Ò»¶¨ÒªÔÚ<title>±êǩǰ¼ÓÈ룬·ñÔòÈç¹û<title>Óë</title>Ö®¼äÓÐÖÐÎÄ×Ö·ûµÄ»°£¬
ÏÔʾµÄ±êÌâÓпÉÄÜÊÇÂÒÂ룡
2.htmlÎ ......
PHP×÷ΪһÖÖ·þÎñÆ÷¶ËµÄ½Å±¾ÓïÑÔ£¬Ïó±àд¼òµ¥£¬»òÕßÊǸ´ÔӵĶ¯Ì¬ÍøÒ³ÕâÑùµÄÈÎÎñ£¬ËüÍêÈ«Äܹ»Ê¤ÈΡ£µ«ÊÂÇé²»×ÜÊÇÈç´Ë£¬ÓÐʱΪÁËʵÏÖij¸ö¹¦ÄÜ£¬±ØÐë½èÖúÓÚ²Ù×÷ϵͳµÄÍⲿ³ÌÐò£¨»òÕß³ÆÖ®ÎªÃüÁ£¬ÕâÑù¿ÉÒÔ×öµ½Ê°빦±¶¡£
¡¡¡¡ÄÇô£¬ÊÇ·ñ¿ÉÒÔÔÚPHP½Å±¾Öе÷ÓÃÍⲿÃüÁîÄØ£¿Èç¹ûÄÜ£¬ÈçºÎÈ¥×öÄØ£¿ÓÐЩʲô·½ÃæµÄ¹ËÂÇÄØ£¿Ïà ......