<?php ##################### //CONFIGURATIONS ##################### // Define the name o…
<?php $dir = "PUT_PATH_TO_DIR_HERE"; // Open a known directory, and proceed t…
<?php function dirSize($directoty){ $dir_size=0; if($dir_handle=@opendir($directoty)) {…
function pdf2png($PDF,$Path){ if(!extension_loaded('imagick')){ return false; } if(!file_e…
语法 integer checkdate (int %Month, int $Day, int $Year); 演示代码 <?PHP echo "2/29/1900…
<?php $exec = shell_exec('uptime'); $uptime = explode(' up ', $exec); $uptime = explode…
<?php /** * “抽奖”函数 * * @param integer $first 起始编号 * @param integer $last 结束编号 * @param …
这段php代码可以把一个颜色变成与之相反的颜色编码,如:白色变成黑色,蓝色变成黄色 function color_inverse($color){ $color = str_rep…
一个php实现的简单语法高亮显示的函数,注意:这个函数设计的比较简单,可能对某些语法不能高亮显示,你可以自己扩充该函数的功能 function syntax_highlight($…
用在服务器上提供下载的php代码,可以指定被下载的文件名,可以动态指定文件内容 // local file that should be send to the client $l…
php计算连接的mysql数据库的大小,用MB,KB或者GB的格式返回 function CalcFullDatabaseSize($database, $db) { $table…
通过php的 similar_text函数比较两个字符串的相似性 $word2compare = "stupid"; $words = array( 'stup…