Difference between revisions of "C.php"

From Organic Design wiki
(oh, not working, shellexec won't execute anything)
(simplify test)
Line 2: Line 2:
 
# C Compiler for XmlWiki Environment
 
# C Compiler for XmlWiki Environment
  
$server = $_SERVER['HTTP_HOST'];
+
#$server = $_SERVER['HTTP_HOST'];
$htdocs = $_SERVER['DOCUMENT_ROOT'];
+
#$htdocs = $_SERVER['DOCUMENT_ROOT'];
if ( !ereg( "\\/$", $htdocs ) ) $htdocs .= '/';
+
#if ( !ereg( "\\/$", $htdocs ) ) $htdocs .= '/';
  
$gcc = $htdocs.'wiki/gcc';
+
#$gcc = $htdocs.'wiki/gcc';
$article = shell_exec($gcc);
+
$article = shell_exec("/usr/bin/gcc -v");
  
 
?>
 
?>

Revision as of 02:50, 23 June 2006

<?

  1. C Compiler for XmlWiki Environment
  1. $server = $_SERVER['HTTP_HOST'];
  2. $htdocs = $_SERVER['DOCUMENT_ROOT'];
  3. if ( !ereg( "\\/$", $htdocs ) ) $htdocs .= '/';
  1. $gcc = $htdocs.'wiki/gcc';

$article = shell_exec("/usr/bin/gcc -v");

?>