]>
Commit | Line | Data |
---|---|---|
d03753f3 MS |
1 | #!/usr/bin/php -nf |
2 | <?php | |
3 | print("Content-Type: text/html\n\n"); | |
4 | print("<!DOCTYPE html>\n" | |
5 | ."<html>\n" | |
6 | ." <head>\n" | |
7 | ." <title>PHP script CGI test page</title>\n" | |
8 | ." </head>\n" | |
9 | ." <body>\n" | |
10 | ." <h1>PHP script CGI test page</h1>\n" | |
11 | ." <pre><kbd>ps ax</kbd>\n"); | |
12 | $fp = popen("ps ax", "r"); | |
13 | while ($line = fgets($fp, 1024)) | |
14 | { | |
15 | print(htmlspecialchars($line)); | |
16 | } | |
17 | print("</pre>\n" | |
18 | ." </body>\n" | |
19 | ."</html>\n"); | |
20 | ?> |