|
Posted by Jerry Stuckle on 06/14/06 02:24
Robert Iver wrote:
> Jerry Stuckle wrote:
>
>>Robert Iver wrote:
>>
>>>I would change the code to the following and see what happens:
>>>
>>><HTML>
>>><HEAD></HEAD>
>>><BODY>
>>><?php
>>> echo("Hello World!");
>>> // need parentheses for echo() function
>>> ?>
>>></BODY>
>>></HTML>
>>>
>>>Also, make sure the filename has the .php extension and not .html
>>>
>>>Let me know if that works for you....
>>>
>>>TristaSD wrote:
>>>
>>>
>>>>Here's my code:
>>>>
>>>><html>
>>>><head>
>>>></head>
>>>>
>>>><body>
>>>>
>>>><?
>>>> echo "Hello, world!";
>>>>?>
>>>>
>>>></body>
>>>></html>
>>>>
>>>>Here's my output:
>>>>
>>>>Hello, world!
>>>>Fatal error: Nesting level too deep - recursive dependency? in Unknown
>>>>on line 0
>>>
>>>
>>HTML tags are case-insensitive, so <html> is exactly the same as <HTML>. No
>>problem there.
>>
>>And no, echo does not require parens.
>>
>>This should work. Or, if the file is tagged .html instead of .php, he'd only
>>get the php code displayed. Obviously the php code is being executed, so that's
>>correct.
>>
>>I'd check the php.ini file first, just to ensure that looks ok (does a phpinfo()
>>call work?). And disable all extensions you don't need for this test (that is,
>>probably ALL extensions). If it now works, re-enable them one at a time and see
>>which is causing the problem (stop/restart your server between tries - don't
>>just do a restart).
>>
>>Then check the web server setup to ensure you're using the version you think
>>you're using.
>>
>>
>>--
>>==================
>>Remove the "x" from my email address
>>Jerry Stuckle
>>JDS Computer Training Corp.
>>jstucklex@attglobal.net
>>==================
>
>
> The main thing I was trying to change in my code was to change the <?
> code delimiter to the <?php delimiter.
>
> I didn't know whether the more generic <? delimiter would be read ad
> function differently then the more php specific <?php one.
>
It's possible - depending on what other extensions are parsing your file.
That's one reason it's frowned upon. But <?php shouldn't cause a problem.
> The HTML can be lowercase (in fact, it's probably better to keep
> everything lowercase in case you want to convert the document to XHTML
> at some point in the future).
>
Yep.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|