myplayer/demo/php/include/functions.inc.php

19 lines
304 B
PHP
Raw Normal View History

2024-09-21 16:05:22 +02:00
<?php
function fatal_error($msg, $status = '505 Internal Server Error') {
header('Status: '.$status);
echo $msg."\n";
return 1;
}
function sanitize_path_request($path_info) {
return preg_replace(
array('|^/|', '/[^A-Za-z0-9\-\.]/'),
array('', ''),
$path_info
);
}