FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


php tutorial problem





aswapathy
I created a hello.php file as instructed that looks like this:

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>

but when I bring it up with my browser it looks like this:

Hello World

'; ?>

anybody know why?
Peterssidan
you must have php installed to be able to run the php code. If you upload it to a server that support php (like frihost) it will work fine.
imagefree
Can you provide the HTML source of the page? (Goto view menue and click source and copy it here).


also have a look again on your php code and copy it too here.
aswapathy
but here it is again:

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>
Diablosblizz
First thing is first, before you go into looking into the source. Is the web hosting your with support PHP? If you are hosted by Frihost then you do have PHP. Try replacing the single (') quotes with double quotes (" - not two of the ' quotes).

HtH.
Peterssidan
I think your problem is that you try to open the file at your own computer. Your computer probably not have php installed. If it has you have to reach your through http://locadlhost/ or similar.
rvec
yeah the script is 100% valid.
This is the output it gives on a php-server:
http://www.bierkip.nl/test/hello.php
Code:
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<p>Hello World</p></body>
</html>
Related topics
PHP Tutorials
PHP Tutorial: Basic Shoutbox w/ MySQL
php tutorial
PHP tutorial - Grand Master Functions
A very good PHP MySQL Tutorial
PHP script problem
PHP Tutorial
Stats problem - php execution problem (MOD Assist Required)
Flex and PHP tutorial
Flex and PHP tutorial
php msql problem
php menus
php mail(); problem... half fixed?
php tutorial
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.