} for ($i = 0; $i < count($EXCLUDE_FILES); $i++) { // Remove a file from the array if it does not exist if (!file_exists($EXCLUDE_FILES[$i])) { array_splice($EXCLUDE_FILES, $i, 1); $i--; continue; } $EXCLUDE_FILES[$i] = realpath($EXCLUDE_FILES[$i]); } //print_r($paths); foreach ($paths as $path) { unset($files); if (is_dir($path)) { $files = get_all_php_files($path, $EXCLUDE_FILES, $RECURSIVE); } else { if (is_file($path)) { $files[] = $path; } else { error("Unknown entity: {$path}"); } } //print_r($files); foreach ($files as $file) { if ($UNDO) { uninstrument($file); } else { instrument($file); } } }
function compileSketch() { global $par, $fn; $fFrom = $par['a7_sel_source']; $fTo = $fn['sketch']; $user = $par['user']; instrument($fFrom, $fTo); $syscom = "cd account/{$user};g++ -o servuino servuino.c > g++.error 2>&1;"; //echo("$syscom<br/>"); system($syscom); }