<?php use flowcode\ceibo\builder\DBBuilder; require_once '../../../../vendor/autoload.php'; if (count($argv) < 2) { fwrite(STDOUT, "Enter a parameter, example: inidb \n"); die; } $method = $argv[1]; switch ($method) { case "build": echo "running..."; echo "\n"; inidb(); break; default: break; } function remove_comments(&$output) { $lines = explode("\n", $output); $output = ""; // try to keep mem. use down $linecount = count($lines); $in_comment = false; for ($i = 0; $i < $linecount; $i++) { if (preg_match("/^\\/\\*/", preg_quote($lines[$i]))) { $in_comment = true; } if (!$in_comment) { $output .= $lines[$i] . "\n";
if (count($argv) < 2) { fwrite(STDOUT, "Enter a parameter, example: inidb \n"); die; } $method = $argv[1]; $host = $argv[2]; $user = $argv[3]; $pass = $argv[4]; $db = $argv[5]; switch ($method) { case "inidb": echo "running..."; echo "\n"; $dbms_schema = $argv[6]; inidb($host, $user, $pass, $db, $dbms_schema); break; case "insertData": echo "running..."; echo "\n"; $dbms_data = $argv[6]; insertData($host, $user, $pass, $db, $dbms_data); break; default: break; } function remove_comments(&$output) { $lines = explode("\n", $output); $output = ""; // try to keep mem. use down