Is it necessary to have
on a page ending with *.php and that has absolutely no markup in it?
Thanks,
-Nick

| Code: |
| <?php ?> |
Thanks,
-Nick
| Code: |
| <?php ?> |
| Quote: |
| When a file is included, parsing drops out of PHP mode and into HTML mode at the beginning of the target file, and resumes again at the end. For this reason, any code inside the target file which should be executed as PHP code must be enclosed within valid PHP start and end tags. |
| polly-gone wrote: | ||
Is it necessary to have
|
| Code: |
| <?php
echo 'hello world'; ?> |
| TomS wrote: | ||||||
I think you got it wrong, mathiaus. If you use php code, you need the php-tags. Even for
|
| mathiaus wrote: |
| Me, wrong??? Never! Razz
Your code uses the php function echo to display hello. You could simply just type hello and rather than php parsing the echo function, it will just serve the text provided (as HTML). Just because the file extension is php doesn't mean that php has to be used, plus the question mention that there was no markup! |
| Code: |
|
<?PHP //write something here echo "foo"; ?> |
| Code: |
|
<html> <body> foo </body> </html> |
| Hogwarts wrote: |
| Mathiaus is quite right here, TomS. |
| polly-gone wrote: | ||
Is it necessary to have
Thanks, -Nick |
| polly-gone wrote: | ||
Is it necessary to have
Thanks, -Nick |
| Code: |
| <?php
Header("Location: mypage.php"); //e.g ?> <i>Some</i> <u>markup</u> <b>here</b> |
| Code: |
| <?php
Header("Location: mypage.php"); //e.g <i>Some</i> <u>markup</u> <b>here</b> |
| Code: |
| <?php
include('include.php'); session_start(); ?> |
| Code: |
| <?php
//some mysql stuff here, and basic functions that need to be included ?> |