tuxfan
Technomancer
Here's the code of a .php file
Here's the output. Notice the output of 2nd block, 2nd line.
I know the problem. Here's the html source code that the browser receives.
I know why this happens. How to display <?php ?> in the browser?
Studying the source of this page gives the following way. Is there no other way?
Code:
<html>
<head></head>
<body>
This is before SCRIPT LANGUAGE="PHP" tag starts
<script language="PHP">
echo("If you can see this, PHP is working with SCRIPT LANGUAGE=\"PHP\" tag");
</script>
This is after SCRIPT LANGUAGE="PHP" tag ends
This is before usual PHP tag starts
<?php
echo("If you can see this, PHP is working with usual \"<?php ?>\" tag");
?>
This is after usual PHP tag ends
</body>
</html>
Here's the output. Notice the output of 2nd block, 2nd line.
Code:
This is before SCRIPT LANGUAGE="PHP" tag starts
If you can see this, PHP is working with SCRIPT LANGUAGE="PHP" tag
This is after SCRIPT LANGUAGE="PHP" tag ends
This is before usual PHP tag starts
If you can see this, PHP is working with usual "" tag
This is after usual PHP tag ends
I know the problem. Here's the html source code that the browser receives.
Code:
<html>
<head></head>
<body>
This is before SCRIPT LANGUAGE="PHP" tag starts
If you can see this, PHP is working with SCRIPT LANGUAGE="PHP" tag
This is after SCRIPT LANGUAGE="PHP" tag ends
This is before usual PHP tag starts
If you can see this, PHP is working with usual "<?php ?>" tag
This is after usual PHP tag ends
</body>
</html>
I know why this happens. How to display <?php ?> in the browser?
Studying the source of this page gives the following way. Is there no other way?
Code:
<?php ?>