mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-08 14:58:42 +00:00
82f8561123
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1343 48356398-32a2-884e-a903-53898d9a118a
10 lines
257 B
PHP
10 lines
257 B
PHP
<?php
|
|
|
|
function assertCli() {
|
|
if (php_sapi_name() != 'cli' && !getenv('PHP_IS_CLI')) {
|
|
echo 'Script cannot be called from web-browser (if you are calling via cli,
|
|
set environment variable PHP_IS_CLI to work around this).';
|
|
exit;
|
|
}
|
|
}
|