File tree 1 file changed +11
-9
lines changed
1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -87,15 +87,17 @@ function index() {
87
87
list ($ info ) = Event::trigger (__CLASS__ , __FUNCTION__ , $ info );
88
88
89
89
$ this ->view ->info = $ info ;
90
- /*
91
- ob_start();
92
- phpinfo();
93
- $php = ob_get_contents();
94
- ob_end_clean();
95
- $php = preg_replace('@^.+?<body><div class="center">|</div></body></html>@ms', '', $php);
96
- $php = preg_replace('@<table>@ms', '<table class="table table-bordered">', $php);
97
- $php = preg_replace('@<h2><a.+?>(.+?)</a></h2>@ms', '<h3>\1</h3>', $php);
90
+
91
+ if (isset ($ this ->request ->get ['phpinfo ' ])) {
92
+ ob_start ();
93
+ phpinfo ();
94
+ $ php = ob_get_contents ();
95
+ ob_end_clean ();
96
+ $ php = preg_replace ('@^.+?<body><div class="center">|</div></body></html>@ms ' , '' , $ php );
97
+ $ php = preg_replace ('@<table>@ms ' , '<table class="table table-bordered"> ' , $ php );
98
+ $ php = preg_replace ('@<h2><a.+?>(.+?)</a></h2>@ms ' , '<h3>\1</h3> ' , $ php );
98
99
99
- $this->view->phpinfo = $php;*/
100
+ $ this ->view ->phpinfo = $ php ;
101
+ }
100
102
}
101
103
}
You can’t perform that action at this time.
0 commit comments