fork download
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5. <?php
  6.  
  7. $filename = "./about.txt";
  8. $doc = $filename;
  9.  
  10. echo $doc;
  11.  
  12. ?>
  13.  
  14. <script type="text/javascript">
  15. get_about();
  16. function get_about() {
  17. var text;
  18.  
  19. text = "<?php echo $doc; ?>";
  20.  
  21. alert(text);
  22. document.getElementById("div2").innerHTML = text;
  23.  
  24. }
  25. </script>
  26.  
  27. </body>
  28.  
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
<html>
<head>
	</head>
<body>
	./about.txt
<script type="text/javascript">
get_about();
function get_about() {
    var text;

    text = "./about.txt";

    alert(text);
    document.getElementById("div2").innerHTML = text;

}
</script>

</body>