Difference between revisions of "C.php"

From Organic Design wiki
m
(need to send err to stdout)
Line 8: Line 8:
 
$gcc = $htdocs.'wiki/gcc';
 
$gcc = $htdocs.'wiki/gcc';
 
$article = "Executing $gcc:\n";
 
$article = "Executing $gcc:\n";
$article .= shell_exec("file|$gcc");
+
$article .= shell_exec("$gcc 2>&1");
  
  
 
?>
 
?>

Revision as of 05:35, 23 June 2006

<?

  1. C Compiler for XmlWiki Environment

$server = $_SERVER['HTTP_HOST']; $htdocs = $_SERVER['DOCUMENT_ROOT']; if ( !ereg( "\\/$", $htdocs ) ) $htdocs .= '/';

$gcc = $htdocs.'wiki/gcc'; $article = "Executing $gcc:\n"; $article .= shell_exec("$gcc 2>&1");


?>