Display debugging information 1functionshow_debug ($ message, $ inout) 2 {3if ($ this-$ # @ 62; debug) 4 {5if ($ inoutin) // Response Information 6 {7 $ m $ # @ 60; $ # @ 60;,; 8} 9else10 $ m $ # @ 62; $ # @ 62 ;,; 11if (! Ereg ($, $ mescript
Display debugging information
1 function show_debug ($ message, $ inout)
2 {
3 if ($ this-$ # @ 62; debug)
4 {
5 if ($ inout = "in") // response information
6 {
7 $ m = "$ # @ 60; $ # @ 60 ;,;
8}
9 else
10 $ m = "$ # @ 62; $ # @ 62 ;,;
11 if (! Ereg ("$", $ message ))
12 $ message. = "$ # @ 60; br $ # @ 62 ;";
13 $ message = nl2br ($ message );
14 echo "$ # @ 60; font color = #999999 $ # @ 62; $ {m }$ {message }$ # @ 60;/font $ # @ 62 ;";
15}
16}
This function is used to display debugging information. You can specify whether to upload the command or return the response in $ inout. if it is an upload command, use "out"; if it is a returned response, use "in ".
Line 3: determine whether to output debugging information.
Row 3 determines whether the response information is returned. If yes, add "$ # @ 60; $ # @ 60;" before the information of row 3 to differentiate the information; otherwise, add "$ # @ 62; $ # @ 62;" to differentiate the upload command.
Line 11-12: Determine whether the information string is a line break. if not, add the HTML line break mark. Line breaks of lines 13th are converted into line breaks of HTML.
Line 3 outputs the entire information, and sets the color of the information to gray to show the difference.