CSV Search
PHP: server.php

Send comments on this topic.

Description

handles starting and stopping of Completesearch Servers.

Contents

start

public static function start(
$csv = "session",
$port = "session",
$skip_pall = false,
$print_output = false) {
Function to start the server

Parameters

$csv

- basename - name of the csv without ending. default current $_SESSION["db"].
$port - port to start the server at. default: $_SESSION['port'].
$skip_pall - skip parsing etc. Useful if this has been already done.
$print_output - print the console output.

stop

public static function stop(
$port = "session",
$print_output = false) {
Function to stop the server on given port.

Paramweters

$port

- port to start the server at. default $_SESSION['port'].
$print_output - print the console output.

restart

public static function restart(
$csv = "session",
$port = "session",
$skip_pall = false,
$print_output = false) {
Function to restart the server

Parameters

$csv

- basename, name of the csv without ending. default current session id.
$port - port to start the server at. default: $_SESSION['port'].
$skip_pall - skip parsing etc. Useful if this has been already done.
$print_output - print the console output.

choosePort

private static function choosePort() {
Function to choose a free Port

print_shell_output

private static function print_shell_output(
$title,
$command,
$op,
$file="session") {
function to print shell output properly Parameters:

$title - Any title
$command - the command that has been executed
$op - output of an exec command.
$file - the file to print in. (echo, session or any filename)

check_files_exist

public static function check_files_exist() {
function to check if all the necessary files are produced during preprocessing

Created with TwinText