public static function GetDocumentRoot() { $documentRoot = $_SERVER['DOCUMENT_ROOT']; if (PHP_SAPI === 'cli') { if (LsSys::GetOS() === LsSys::LS_OS_WINDOWS) { $documentRoot = LsSys::LS_WINDOWS_CLI_DOCUMENT_ROOT; } else { if (LsSys::GetOS() === LsSys::LS_OS_LINUX) { $documentRoot = LsSys::LS_LINUX_CLI_DOCUMENT_ROOT; } } } return $documentRoot; }
public function __construct() { // // Set the server name and ip address. // $this->hostname = gethostname(); $this->hostIpAddr = gethostbyname($this->hostname); $this->portNumber = $this->GetMainListeningPortNumber(); // // Set the operating system // $this->operatingSystem = LsSys::GetOS(); // // Create the listening and worker threads. // $this->listenThread = $this->AddThread(); $this->listenThread->Name("ListeningThread"); $this->listenThread->SetRunFunction($this, 'ThreadEntryPoint'); }