about the error in the code

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Umesh37
Forum Newbie
Posts: 2
Joined: Fri Jan 08, 2010 1:30 am

about the error in the code

Post by Umesh37 »

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<p>this is html line
<p>
<?php
echo "this is php line";
phpinfo();
?>
</body></html>

this my PHP script.
i have installed Apache web Server,Mysql 5.0,PHP 5.2.11,& Internet Explorer 6.0.But after deploying on web browser it shows only line this is html line.
please tell me what is error in the code?or it is necessary to install the lower version.
aravona
Forum Contributor
Posts: 347
Joined: Sat Jun 13, 2009 3:59 pm
Location: England

Re: about the error in the code

Post by aravona »

I copied your code into my own .php file and this works fine for me, I get:

this is html line

this is php line

Then the php info.

I'm using internet explorer 7 and MySQL version 5.1.36, PHP version 5.3.0 and Apache 2.2.11
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: about the error in the code

Post by AbraCadaver »

Is the file extension .html or .php?
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Post Reply