53 if (!isset($args[0]) || empty($args[0])) {
57 $filePath =
$bearsamppRoot->getVhostsPath() .
'/' . $args[0] .
'.conf';
58 if (!file_exists($filePath)) {
62 $fileContent = file_get_contents($filePath);
63 if (!preg_match(
'/ServerName\s+(.*)/', $fileContent, $matchServerName) ||
64 !preg_match(
'/DocumentRoot\s+"(.*)"/', $fileContent, $matchDocumentRoot)) {
68 $this->initValue = trim($matchServerName[1]);
77 $filePath =
$bearsamppRoot->getVhostsPath() .
'/' . $this->initValue .
'.conf';
78 $fileContent = file_get_contents($filePath);
79 preg_match(
'/DocumentRoot\s+"(.*)"/', $fileContent, $matchDocumentRoot);
82 $this->wbLabelServerName = $bearsamppWinbinder->createLabel(
85 15, 15, 85,
null, WBC_RIGHT
87 $this->wbInputServerName = $bearsamppWinbinder->createInputText(
93 $this->wbLabelDocRoot = $bearsamppWinbinder->createLabel(
96 15, 45, 85,
null, WBC_RIGHT
98 $this->wbInputDocRoot = $bearsamppWinbinder->createInputText(
101 105, 43, 190,
null,
null, WBC_READONLY
103 $this->wbBtnDocRoot = $bearsamppWinbinder->createButton(
109 $this->wbLabelExp = $bearsamppWinbinder->createLabel(
235 $bearsamppWinbinder->setText(
239 $bearsamppWinbinder->setEnabled(
247 $documentRoot = $bearsamppWinbinder->sysDlgPath(
252 if ($documentRoot && is_dir($documentRoot)) {
253 $bearsamppWinbinder->setText($this->wbInputDocRoot[
WinBinder::CTRL_OBJ], $documentRoot .
'\\');
254 $bearsamppWinbinder->setText(