I have a file javascript.php
which is inserted into my PHP File like this
$data = array(...Some parameters...);
echo '<script src="path/to/file/javascript.php?'.http_build_query($data).'" type="text/javascript"></script>'."
";
The javascript.php file looks like this:
<?php header('Content-Type: text/javascript'); ?>
$(window).load(function() {
alert('Loaded: <? $_GET['someparameter'] ?>');
});
But it only alerts Loaded:
nothing with the $_GET
.
What did I do wrong, how can I get the Parameters of the URI?