2021-12-07 13:27
181
0
0
0
PHP计算字符串长度
strlen()是PHP自带的计算英文字符串的函数。
GBK字符串长度
中文字符计算为2个字符,英文字符计算为1个,可以统计中文字符串长度的函数。
function abslength($str){
$len=strlen($str);
$i=0;
while($i
2021-12-07 13:27
100
0
0
0
PHP 多层目录创建文件夹
function createFolder($path)
{
if (!file_exists($path))
{
createFolder(dirname($path));
}
}
2021-12-07 13:27
89
0
0
0
PHP截取字符串
PHP截取字符串,用函数截取字符串的专题,支持UTF-8、GB2312、GBK多种字符集。
截取GB2312中文字符串
截取utf8编码的多字节字符串
UTF-8、GB2312都支持的汉字截取函数
PHP字符截取函数
2021-12-07 13:27
90
0
0
0
2021-12-07 13:27
95
0
0
0
class mysql{
private $host;
private $name;
private $pass;
private $table;
private $ut;
function __construct($host,$name,$pass,$table,$ut){
$this->host=$host;
$this->name=$n
2021-12-07 13:27
104
0
0
0
function inserttag(topen,tclose){
var themess = document.getElementById('con');//编辑对象
themess.focus();
if (document.selection) {//如果是否ie浏览器
var theSelection = document.s
2021-12-07 13:27
101
0
0
0
分享PHP技术开发技巧
本文档的阅读对象是有一定经验的PHP程序员,文档中将介绍在PHP开发中的一些开发技巧,希望能对读者有一定的启发。
1. 提高PHP的运行效率
PHP的优点之一是速度很快,对于一般的网站应用,可以说是已经足够了。不过如果站点的访问量很高、带宽窄或者其它的因素令服务器产生性能瓶颈的时候,你可能得想想其它的办法来进一步提高
2021-12-07 13:27
178
0
0
0
mysql_affected_rows
mysql_affected_rows -- 取得前一次 MySQL 操作所影响的记录行数
例子 1. mysql_affected_rows() 例子
$link = mysql_connect('localhost', 'mysql_user', 'mysql_pas