下面代码都在一个php文件test.php中
<?php
$version = "app 0.1";
?>
<html>
<head>
<script>
var ver = "<?=$version; ?> ";
document.write("version:"+ver);
</script>
</head>
</html>
下面代码都在一个php文件test.php中
<?php
$version = "app 0.1";
?>
<html>
<head>
<script>
var ver = "<?=$version; ?> ";
document.write("version:"+ver);
</script>
</head>
</html>