Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.3: Enable the built-in PHP module' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Enable the built-in PHP module
Authored by: warrens on Nov 14, '03 09:26:27PM
No, PHP doesn't need the ?> at the end of a script for it to parse correctly. May be nice for appearances (and necessary for brain-dead editors like Dreamweaver), but on the other hand, any empty lines you may have in your PHP after the closing tag, will be sent out to the client, which is unnecessary.
<? phpinfo();
works fine.

[ Reply to This | # ]
10.3: Enable the built-in PHP module
Authored by: babbage on Nov 17, '03 12:14:58AM

Just because it can be done doesn't mean it's correct.

The whole point of "smart" markup languages like PHP, SSI, ASP, or JSP is to contain the advanced logic inside of HTML/XML/SGML tags so that the document remains otherwise syntactically valid. If Dreamweaver complains about a dangling marker like PHP's "?>", it's doing the right thing.

Come on, its only another two characters (three if you count a line break) -- it's not hard to include, and doing so is one way to avoid a mentality of sloppiness that can come back to haunt you when debugging other code later.

---
--
DO NOT LEAVE IT IS NOT REAL

[ Reply to This | # ]

10.3: Enable the built-in PHP module
Authored by: avanham on Nov 17, '03 08:46:53AM

Actually, I was talking about the () brackets. The original post had only :

[code]phpinfo[/code]

which didn't work on my system until I added the brackets:

[code]phpinfo()[/code]



[ Reply to This | # ]