php专区

 首页 > php专区 > PHP应用 > php类库 > PHP顶层类 - php类库

PHP顶层类 - php类库

分享到:
【字体:
导读:
          ?php ***Object*baseclass* classObject{ *是否输出调试信息* var$debug=true; ***Object*@deprecated析构方法**@returnvoid* functionObj...

PHP顶层类

  1. /** 
  2. * Object 
  3. * base class 
  4. */ 
  5. class Object 
  6. /* 是否输出调试信息 */ 
  7. var $debug = true; 
  8.  
  9. /** 
  10. * Object 
  11. * @deprecated 析构方法 
  12. * 
  13. * @return void 
  14. */ 
  15. function Object() 
  16. //用户是否从主页进入,做判定 
  17. if ( !defined( 'INDEX' ) ) 
  18. die"Hacking attempt" ); 
  19. //echo 'create Object success!'; 
  20.  
  21. /** 
  22. * msg_die 
  23. * @deprecated 调试信息输出 
  24. * @param string 
  25. * @return void 
  26. */ 
  27. function msg_die( $info , $file , $line ) 
  28. if$this->debug ) 
  29. $format = "There is happen error information: %s ."
  30. " the file name: %s , on line : %s . "
  31. printf( $format , $info , $file , $line ); 
  32. $error = debug_backtrace(); 
  33. print_r ( $error[0] ); 
  34.  
  35. /** 
  36. * setDebug 
  37. * @deprecated 设置是否输出调试信息 
  38. * @param boolean true or false 
  39. * @return void 
  40. */ 
  41. function setDebug( $bool ) 
  42. $this->debug = is_bool$bool ) ? $bool : false ; 
  43.  
  44. /** 
  45. * getDebug * @deprecated 查看是否打开调试信息 
  46. * @param void 
  47. * @return boolean 
  48. */ 
  49. function getDebug() 
  50. return $this->debug; 
  51. ?>
分享到:
phpword中文字符乱码解决办法 - php类库
phpword中文字符乱码解决办法 最近领导要求用php生成word,网上找了很多类啊,函数啊,最终相中phpword,无奈不是国人开发,对中文支持很不友好,经过研究,终于解决了中文乱码,分享出来。 1、用模板word生成word中文乱码解决方案:打开phpword/Template.php文件,找到$replace = utf8_encode($repl...
PHP多功能图片处理类 - php类库
PHP多功能图片处理类 setSrcImg("img/test.jpg");          $t->setCutType(1);//这一句就OK了          $t->setDstImg("tmp/new_test.jpg");          $t->createImg(60,60);                 手工裁切:          程序会按照...
  •         php迷,一个php技术的分享社区,专属您自己的技术摘抄本、收藏夹。
  • 在这里……