Gestione JS locali
This commit is contained in:
@@ -701,4 +701,20 @@ function addslashes_array ($value) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
function caricajs () {
|
||||
$script = $_SERVER["PHP_SELF"];
|
||||
$base = $_SERVER["DOCUMENT_ROOT"];
|
||||
$path_parts = pathinfo($script);
|
||||
|
||||
$path = $path_parts['dirname'];
|
||||
$noext = $path_parts['filename'];
|
||||
|
||||
$js = "$path/jsl/$noext.js";
|
||||
$js_test = "$base$path/jsl/$noext.js";
|
||||
|
||||
if (file_exists ($js_test)) {
|
||||
print "\t<script src=\"$js\"></script>";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user