newbie cant get off first rung
Posted by: labspencer (---.range86-149.btcentralplus.com)
Date: June 29, 2009 06:20PM

Hi, I have installed WampServer on a fresh install of WinXP Home so no IIS installed. right click the icon and the local host loads the index.php ok. Now I have placed a new folder in the www root and called it mypage and have created an index.php file and embedded a simple php command in some html as follows:

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


the web browser loads the page but the php command doesnt work, no 'hello world' only the title is there. there are no errors and i have spent a few hours trying to get it working and searching this forum- found a suggestion for adding an Addtype command to config and htaccess files and tried this but still no luck

as im just getting started and following a tutorial to get to grips with php and mysql I was hoping WampServer would be useful but cant get past square one - if anybody can help?

Leigh

Options: ReplyQuote
Re: newbie cant get off first rung
Posted by: yfastud (Moderator)
Date: June 29, 2009 06:24PM

make sure no hidden .txt in your file index.php winking smiley

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: newbie cant get off first rung
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: June 29, 2009 07:04PM

Whenever you are running any .php file make sure you open your browser and go to [localhost]

Also not loading PHP files directly in to the browser (from windows explorer or File -> Open) is not the correct way.

Options: ReplyQuote
Re: newbie cant get off first rung
Posted by: labspencer (---.opaltelecom.net)
Date: June 29, 2009 07:50PM

Hi, thanks for your replies - no hidden .txt in the filename and I open the page by using the following address [localhost] so any other ideas? Ive tried taking out all the html and just having a file with the php command but the page is still blank!

Options: ReplyQuote
Re: newbie cant get off first rung
Posted by: toumimi (---.223.115-78.rev.gaoland.net)
Date: June 29, 2009 11:22PM

The fact that you get the title "PHP test" and not the php para is strange..
You can try the direct url http://localhost/mypage/index.php
You may also have a look to the browser source of your page...
Maybe you can see ph code not executed...

Florian

WampServer Patch (Screenshots)
Topic EN : www.wampserver.com
Topic FR : www.wampserver.com

Options: ReplyQuote
Re: newbie cant get off first rung
Posted by: labspencer (---.range86-149.btcentralplus.com)
Date: June 30, 2009 11:09AM

Hi, thanks for your replies, finally managed to get it working, just copied the original menu page index.php file into my new folder deleted all of it and entered the code and it worked, must be some problem with creating the index file in notepad and then saving it with the .php extension, could someone tell me the best way of creating a new .php file to get round this problem - a simple php editor or something.


cheers by the way

Leigh

Options: ReplyQuote
Re: newbie cant get off first rung
Posted by: yfastud (Moderator)
Date: June 30, 2009 01:57PM

to save file in notepad, make sure to enclose the whole filenam.ext in double quote; if interested in other text editor, you can try notepad++ or EditPad

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote


Sorry, only registered users may post in this forum.