>>
>> This is a test
>>
>> Hello world!
>>
>>
>> " ?>
>>
>> It dosen't display generate the correct HTML for display in my browser
>
>
> The problem is .
> You should escape your double-quotes like so: \".
>
> Floris
thanks Floris - I made the change, but the result is still:
>>>
>>> This is a test
>>>
>>> Hello world!
>>>
>>>
>>> " ?>
>>>
>>> It dosen't display generate the correct HTML for display in my browser
>>
>>
>>
>> The problem is .
>> You should escape your double-quotes like so: \".
>>
>> Floris
>
>
> thanks Floris - I made the change, but the result is still:
>
> Hello world! " ?>
>
> In the browser - am I missing something?
My corrected code (according to tip from Floris) is:
>>>>
>>>> This is a test
>>>>
>>>> Hello world!
>>>>
>>>>
>>>> " ?>
>>>>
>>>> It dosen't display generate the correct HTML for display in my browser
>>>
>>>
>>>
>>> The problem is .
>>> You should escape your double-quotes like so: \".
>>>
>>> Floris
>>
>>
>> thanks Floris - I made the change, but the result is still:
>>
>> Hello world! " ?>
>>
>> In the browser - am I missing something?
> My corrected code (according to tip from Floris) is:
>
> $cssfile = (stristr($_SERVER['HTTP_USER_AGENT','msie'))?'ie.css':'ff.cs s';
> echo
> "
>
>
> This is a test
>
> Hello world!
>
> "
> ?>
First your html is invalid. BODY can only contain block elements (fix by
placing Hello world! in a block element like P. Second, your HTML tag is
not correct for XHTML, but /> is used to close the (empty) LINK tag.
Your PHP problem is that you did not end the echo statement with ;,
but if you cannot write valid HTML for a document as simple as this, you
have more serious problems.
--
Lars Eighner usenet@larseighner.com
Countdown: 284 days to go.
Re: Whats wrong with this code?
am 11.04.2008 09:16:10 von alvaroNOSPAMTHANKS
Ronald Raygun escribió:
> thanks Floris - I made the change, but the result is still:
>
> Hello world! " ?>
>
> In the browser - am I missing something?
First of all, always check the actual output generated by PHP, not what
the browser renders. In Firefox go to View-> Page source
It seems that you haven't configured PHP to display errors. Edit your
php.ini file and set these directives:
display_errors = On
error_reporting = E_ALL
Re: Whats wrong with this code?
am 11.04.2008 09:20:57 von piotr
Ronald Raygun wrote:
>
> $cssfile =
> (stristr($_SERVER['HTTP_USER_AGENT','msie'))?'ie.css':'ff.cs s';
You are missing closing square bracket: $_SERVER['HTTP_USER_AGENT']
besides that, it should work fine i think
best regards
Piotr
Re: Whats wrong with this code?
am 11.04.2008 09:32:56 von Ronald Raygun
Álvaro G. Vicario wrote:
> Ronald Raygun escribió:
>
>> thanks Floris - I made the change, but the result is still:
>>
>> Hello world! " ?>
>>
>> In the browser - am I missing something?
>
>
> First of all, always check the actual output generated by PHP, not what
> the browser renders. In Firefox go to View-> Page source
>
> It seems that you haven't configured PHP to display errors. Edit your
> php.ini file and set these directives:
>
> display_errors = On
> error_reporting = E_ALL
Álvaro, Piotr, thanks very much for your patience. I had made a number
of silly typing errors hich I have now fixed. The code works fine now.
Many thanks for your help