I tried the following PHP script
%26lt;HTML%26gt;
%26lt;HEAD%26gt;
%26lt;TITLE%26gt;My first PHP script%26lt;/TITLE%26gt;
%26lt;/HEAD%26gt;
%26lt;BODY%26gt;
%26lt;CENTER%26gt;My first PHP script%26lt;/CENTER%26gt;
%26lt;?
echo %26quot;%26lt;center%26gt;Hello World%26lt;P%26gt;%26lt;/center%26gt;%26quot;;
$today = date( %26quot;l dS of F Y h:i:s A%26quot; );
PRINT %26quot;%26lt;CENTER%26gt;Today is: $today.%26lt;/CENTER%26gt;%26quot;;
?%26gt;
%26lt;/BODY%26gt;
%26lt;/HTML%26gt;
On My web site but it display the text as if it were straight HTML and the PHP commands did not work.
My web host is Namesecure.com and they supposedly have PHP set up on my site, but obviously there is
something that they need to configure or something that I forgot to include to get it to run.
Please help?
Why wont my PHP run?
Try saving it as .php
Why wont my PHP run?
configure your PHP settings
Other Replys:Whatever file the displayed text above is in, it needs to have a php extension. Other than that, try running phpinfo. If it does not work, your php is not properly installed.
Other Replys:there is nothing wrong with your code
usually web sites have some folders which are configured to run php and some which aren%26#039;t. move/copy your file around til you find the correct script-enabled folder. normally this would be a folder called public-html or something like that.
No comments:
Post a Comment