PHP code example of liquidweb / htaccess-validator
1. Go to this page and download the library: Download liquidweb/htaccess-validator 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/ */
liquidweb / htaccess-validator example snippets
use LiquidWeb\HtaccessValidator\Validator;
$validator = new Validator($file);
use LiquidWeb\HtaccessValidator\Validator;
$validator = Validator::createFromString('Options +FollowSymLinks');
# Throws a LiquidWeb\HtaccessValidator\Exceptions\ValidationException upon failure.
$validator->validate();
# Return a boolean.
$validator->isValid();
# Absolute system path to the shell script.
putenv('HTACCESS_VALIDATOR_SCRIPT=/some/path/to/vendor/bin/htaccess-validator');
# Will now use the Htaccess Validator script specified above.
$validator = (new Validator($file))->validate();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.