Php probe phpinfo () function disabled

Source: Internet
Author: User
Php probe phpinfo () function disabled

  1. Header ("content-type: text/html; charset = utf-8 ");

  2. Header ("cache-control: no-cache, must-revalidate ");
  3. Header ("pragma: no-cache ");
  4. Error_reporting (0 );
  5. Ob_end_flush ();

  6. ?>

  7. // Add this sentence to see if it can solve the problem of garbled characters in linux?
  8. Php probe v1.0-bbs.it-home.org
  9. Copyright information

  10. [Basic info] [advanced info]
  11. If (function_exists ("phpinfo ")){
  12. Echo '[phpinfo]';}

  13. Echo'
    Php probe v1.0 by mkduse (blueidea-id)

    This program code can be used for free, but cannot be used for commercial purposes. it is completely reproduced or used. Please retain the copyright information;
    Please correct your suggestions. qq: 122712355

    ';

  14. If (empty ($ _ get ['typ']) {

  15. Baseinfo ();}
  16. Else {
  17. Switch ($ _ get ['typ']) {
  18. Case 'phpinfo ':
  19. Phpinfoview ();
  20. Break;
  21. Case 'superinfo ':
  22. Superinfo ();
  23. Break;
  24. Case 'baseinfo ':
  25. Baseinfo ();
  26. Break;
  27. Default:
  28. Baseinfo ();}
  29. }

  30. Function getime ()

  31. {
  32. $ T = gettimeofday ();
  33. Return (float) ($ t ['SEC '] + $ t ['usec']/1000000 );
  34. }

  35. Function baseinfo (){

  36. Echo 'basic information ';
  37. $ Arr [] = array ("current php version:", phpversion ());
  38. $ Arr [] = array ("zend engine version:", zend_version ());
  39. $ Arr [] = array ("server version", $ _ server ['server _ soft']);
  40. $ Arr [] = array ("ip address", $ _ server ['remote _ host']); // ip
  41. $ Arr [] = array ("domain name", $ _ server ['http _ host']);
  42. $ Arr [] = array ("protocol port", $ _ server ['server _ protocol']. '. $ _ server ['server _ port']);
  43. $ Arr [] = array ("site root directory", $ _ server ['path _ translated ']);
  44. $ Arr [] = array ("server time", date ('y, m, d, h: I: s, D '));
  45. $ Arr [] = array ("current user", get_current_user ());
  46. $ Arr [] = array ("Operating System", php_uname ('s'). php_uname ('r'). php_uname ('V '));
  47. $ Arr [] = array ("include_path", ini_get ('include _ path '));
  48. $ Arr [] = array ("server api", php_sapi_name ());

  49. $ Arr [] = array ("error_reporting level", ini_get ("display_errors "));

  50. $ Arr [] = array ("post submission restrictions", ini_get ('post _ max_size '));
  51. $ Arr [] = array ("upload_max_filesize", ini_get ('upload _ max_filesize '));
  52. $ Arr [] = array ("script timeout", ini_get ('max _ execution_time '). 'second ');

  53. If (ini_get ("safe_mode") = 0 ){

  54. $ Arr [] = array ("php Security mode (safe_mode)", 'off ');}
  55. Else {
  56. $ Arr [] = array ("php Security mode (safe_mode)", 'on ');}

  57. If (function_exists ('memory _ get_usage ')){

  58. $ Arr [] = array ("memory_get_usage", ini_get ('memory _ get_usage '));}

  59. // $ Arr [] = array ("available space", intval (diskfreespace ('/')/(1024*1024). "m ");

  60. Echo'
  61. For ($ I = 0; $ I
  62. {
  63. Echo $ overview;
  64. $ Overview ='
  65. }
  66. Echo'
  67. '; ';
    '. $ Arr [$ I] [0].' '. $ Arr [$ I] [1].'
    ';
  68. Echo 'server performance test ';
  69. Echo'
  70. Echo'
  71. $ Time_start = getime ();
  72. $ Time_start = getime ();

  73. For ($ I = 0; $ I <= 500000; $ I ++ );
  74. {$ Count = 1 + 1 ;}
  75. $ Timea = round (getime ()-$ time_start );
  76. Echo'
  77. For ($ I = 0; $ I <= 500000; $ I ++ );
  78. {Sqrt (3.14 );}
  79. $ Timea = round (getime ()-$ time_start );
  80. Echo'
  81. '; '; ';
    Server Integer operation
    0.5 million addition (1 + 1)
    Floating point operation
    0.5 million square root (3.14 square root)
    Mkduse (p4 1.5g 256ddr winxp sp2) 465.08 ms 466.66 ms
    Current server '. $ Timea.' ms'. $ Timea.' ms
    ';

  82. ?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.