php 948

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

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

2015-01-31 250

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

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

2015-01-31 251

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

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

2015-01-31 682

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

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

2015-01-31 500

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

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

2015-01-31 405

#PHP
备份mysql数据的php代码

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

2015-01-31 619

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

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

2015-01-31 298

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

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

2015-01-31 997

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

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

2015-01-31 448

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

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

2015-01-31 285

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

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

2015-01-31 429

#PHP
简单的php抽奖代码

<?php /** * “抽奖”函数 * * @param integer $first 起始编号 * @param integer $last 结束编号 * @param …

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