I have this codes in a php file (init_js.php):
<script>
<?php
$idx = $_GET['id'];
$APP_WEB_PATH = APP_WEB_PATH;
?>
var idx = '<?=$idx?>';
var APP_WEB_PATH = '<?=$APP_WEB_PATH?>';
</script>
Then I import this file to a php page (branch.php). When I view source I can see
var idx = '7';
var APP_WEB_PATH = 'http://zzzz.com/dev';
Is there a way to prevent this situation. Your help is kindly appreciated.