Php probe phpinfo () function disabled
-
Header ("content-type: text/html; charset = utf-8 ");
- Header ("cache-control: no-cache, must-revalidate ");
- Header ("pragma: no-cache ");
- Error_reporting (0 );
- Ob_end_flush ();
-
?>
- // Add this sentence to see if it can solve the problem of garbled characters in linux?
- Php probe v1.0-bbs.it-home.org
-
-
-
-
Copyright information
- [Basic info] [advanced info]
- If (function_exists ("phpinfo ")){
- Echo '[phpinfo]';}
-
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 ';
-
If (empty ($ _ get ['typ']) {
- Baseinfo ();}
- Else {
- Switch ($ _ get ['typ']) {
- Case 'phpinfo ':
- Phpinfoview ();
- Break;
- Case 'superinfo ':
- Superinfo ();
- Break;
- Case 'baseinfo ':
- Baseinfo ();
- Break;
- Default:
- Baseinfo ();}
- }
-
Function getime ()
- {
- $ T = gettimeofday ();
- Return (float) ($ t ['SEC '] + $ t ['usec']/1000000 );
- }
-
Function baseinfo (){
- Echo 'basic information ';
- $ Arr [] = array ("current php version:", phpversion ());
- $ Arr [] = array ("zend engine version:", zend_version ());
- $ Arr [] = array ("server version", $ _ server ['server _ soft']);
- $ Arr [] = array ("ip address", $ _ server ['remote _ host']); // ip
- $ Arr [] = array ("domain name", $ _ server ['http _ host']);
- $ Arr [] = array ("protocol port", $ _ server ['server _ protocol']. '. $ _ server ['server _ port']);
- $ Arr [] = array ("site root directory", $ _ server ['path _ translated ']);
- $ Arr [] = array ("server time", date ('y, m, d, h: I: s, D '));
- $ Arr [] = array ("current user", get_current_user ());
- $ Arr [] = array ("Operating System", php_uname ('s'). php_uname ('r'). php_uname ('V '));
- $ Arr [] = array ("include_path", ini_get ('include _ path '));
- $ Arr [] = array ("server api", php_sapi_name ());
-
$ Arr [] = array ("error_reporting level", ini_get ("display_errors "));
- $ Arr [] = array ("post submission restrictions", ini_get ('post _ max_size '));
- $ Arr [] = array ("upload_max_filesize", ini_get ('upload _ max_filesize '));
- $ Arr [] = array ("script timeout", ini_get ('max _ execution_time '). 'second ');
-
If (ini_get ("safe_mode") = 0 ){
- $ Arr [] = array ("php Security mode (safe_mode)", 'off ');}
- Else {
- $ Arr [] = array ("php Security mode (safe_mode)", 'on ');}
-
If (function_exists ('memory _ get_usage ')){
- $ Arr [] = array ("memory_get_usage", ini_get ('memory _ get_usage '));}
-
// $ Arr [] = array ("available space", intval (diskfreespace ('/')/(1024*1024). "m ");
- Echo'
- For ($ I = 0; $ I
- {
- Echo $ overview;
- $ Overview ='
- }
- Echo'
';
| '. $ Arr [$ I] [0].' |
'. $ Arr [$ I] [1].' |
';
';
- Echo 'server performance test ';
- Echo'
- Echo'
- $ Time_start = getime ();
-
$ Time_start = getime ();
- For ($ I = 0; $ I <= 500000; $ I ++ );
- {$ Count = 1 + 1 ;}
- $ Timea = round (getime ()-$ time_start );
- Echo'
- For ($ I = 0; $ I <= 500000; $ I ++ );
- {Sqrt (3.14 );}
- $ Timea = round (getime ()-$ time_start );
- Echo'
| 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 |
';
-
- ?>
|