PHP code example of ecxod / apache
1. Go to this page and download the library: Download ecxod/apache library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ecxod / apache example snippets
use Ecxod\Apache\Apache;
# This are the Keys (must match to number of columns in the config)
$keysArr = ["KEY1", "KEY2", "KEYn"];
# This is the config file you want to parse
$configPath = '/etc/apache2/sites-enabled/001-SSLHost.conf';
$parseConfig = new Apacche;
$result = $parseConfig->parseApacheMacroConfigLinear($configPath);
print_r($result);
bash
php composer.phar