php 948

#PHP
php把一个颜色变深的函数

这个php函数可以把指定的颜色变得更深一些 function ColorDarken($color, $dif=20){ $color = str_replace('#', '',…

2015-01-31 729

#PHP
php 类定义和类使用实例

<?php class emp { var $name; var $address; var $dept; function assign_info($n,$a,$d) { …

2015-01-31 253

#PHP
php连接ms sql server的简单示例

/* ** Connect to database: */ // Connect to the database (host, username, password) $con =…

2015-01-31 253

#PHP
PHP取得中文字符串的首字母

<?php $limit = array( //gb2312 拼音排序 array(45217,45252), //A array(45253,45760), //B arr…

2015-01-31 685

#PHP
PHP函数copy()复制文件示例

<?php $old = 'C:\tmp\someold.txt'; $new = 'C:\tmp\somenew.txt'; copy($old,$new) or die(…

2015-01-31 503

#PHP
php通过修改header强制图片下载的代码

unction downloadFile($file){ $file_name = $file; $mime = 'application/force-download'; hea…

2015-01-31 409

#PHP
备份mysql数据的php代码

<?php ##################### //CONFIGURATIONS ##################### // Define the name o…

2015-01-31 622

#PHP
php读取指定目录下的所有文件

<?php $dir = "PUT_PATH_TO_DIR_HERE"; // Open a known directory, and proceed t…

2015-01-31 301

#PHP
计算文件大小的php代码

<?php function dirSize($directoty){ $dir_size=0; if($dir_handle=@opendir($directoty)) {…

2015-01-31 999

#PHP
利用imagick库把PDF转成PNG格式的PHP代码

function pdf2png($PDF,$Path){ if(!extension_loaded('imagick')){ return false; } if(!file_e…

2015-01-31 452

#PHP
php检查日期函数checkdate使用示例

语法 integer checkdate (int %Month, int $Day, int $Year); 演示代码 <?PHP echo "2/29/1900…

2015-01-31 288

#PHP
将linux运行时间格式成易读格式的php代码

<?php $exec = shell_exec('uptime'); $uptime = explode(' up ', $exec); $uptime = explode…

2015-01-31 432
1 60 61 62 63 64 79