摘要:
function FileExtension($fstr){ $retval = ''; $pt = strrpos($fstr, "."); if ($pt) $retval = substr($fstr, $pt+1, strlen($fstr) - $pt); return ($retval);} 阅读全文
posted @ 2013-01-14 14:26
joy696163
阅读(172)
评论(0)
推荐(0)
摘要:
<?phpfunction Pinyin($_String, $_Code='UTF8'){ //GBK页面可改为gb2312,其他随意填写为UTF8$_DataKey = "a|ai|an|ang|ao|ba|bai|ban|bang|bao|bei|ben|beng|bi|bian|biao|bie|bin|bing|bo|bu|ca|cai|can|cang|cao|ce|ceng|cha"."|chai|chan|chang|chao|che|chen|cheng|chi|chong|chou|chu|chuai|chuan|chua 阅读全文
posted @ 2013-01-14 14:24
joy696163
阅读(400)
评论(0)
推荐(0)
摘要:
<?phpdefine( 'NL', "\n" );define( 'TB', ' ' );// connecting to MySQL.$conn = @mysql_connect( 'localhost', 'username', 'password' ) or die( mysql_errno().': '.mysql_error().NL );// attempt to get a list of MySQL databases// already 阅读全文
posted @ 2013-01-14 13:59
joy696163
阅读(943)
评论(0)
推荐(0)
摘要:
//image.php<?php function imageResize($url, $width, $height) {//图像的src路径,转换后的宽,转换后的高 header('Content-type: image/jpeg'); list($width_orig, $height_orig) = getimagesize($url); //echo $width_orig; $ratio_orig = $width_orig/$height_orig;//原始图像宽高比 ... 阅读全文
posted @ 2013-01-14 11:27
joy696163
阅读(350)
评论(0)
推荐(0)