File: test.php

package info (click to toggle)
cups 2.4.16-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,500 kB
  • sloc: ansic: 159,650; cpp: 8,595; sh: 5,475; makefile: 2,770; php: 17; python: 10
file content (20 lines) | stat: -rwxr-xr-x 462 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/php -nf
<?php
print("Content-Type: text/html\n\n");
print("<!DOCTYPE html>\n"
     ."<html>\n"
     ."  <head>\n"
     ."    <title>PHP script CGI test page</title>\n"
     ."  </head>\n"
     ."  <body>\n"
     ."    <h1>PHP script CGI test page</h1>\n"
     ."    <pre><kbd>ps ax</kbd>\n");
$fp = popen("ps ax", "r");
while ($line = fgets($fp, 1024))
{
  print(htmlspecialchars($line));
}
print("</pre>\n"
     ."  </body>\n"
     ."</html>\n");
?>