• 自用类模块框架(二)-功能入口的调用

    任何功能应用将确定为单个PHP文件编写,入口均以嵌套形式声明并调用,如下:<? //载入中继应用父模块 include(dirname(__FILE__)."/include/class_www.php"); //定义入口类 class body_page{           //类入口函数    &n...

  • 兼容PHP5.2低版本的UTF-8转GB编码

    //UTF-8 转 GB 编码 function utf_gb($utfstr) { if(function_exists('iconv')) { return @iconv('utf-8','gbk//ignore',$utfstr); } if(trim($utfstr)=="") { return&n...

  • 对HTML源码及内容过滤,取出纯文字

    //去除THML代码 function html_to_txt($document) { $search = array("'<script[^>]*?>.*?</script>'si", // strip out javascript "'<[\/\!]*?[^<>]*?>'...

  • 兼容PHP5.2低版本的GB转UTF-8编码

    //GB 转 UTF-8 编码 function gb_utf($gbstr) { if(function_exists('iconv')) { return @iconv('gbk','utf-8//ignore',$gbstr); } if(trim($gbstr)=="") { return ...

  • 自用类模块框架(一)结构说明

    本人自用类模块框架,主要包含以下文件/includefunction.php        (常规函数)class_index.php    (主类框架)class_www.php    (中继父类-应用函数)sys_config.php    (变量配置)[function.p...

  • 获取访问者IP

    function get_ip() { $clientip = ""; if(getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown")) { $clientip =&...

第 1 页 , 共 2 页