473,383 Members | 1,742 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Getting started with PHP and helloworld not working

hi everyone,

i want to start learning php and how to develop with it. I downloaded wampserver and installed it without any complications. I then turned to some ebooks for documentation and started coding. However, all the examples i've tried so far have now been working.
for example:
Expand|Select|Wrap|Line Numbers
  1. html>
  2.     <body>
  3.  
  4.         <?php
  5.             echo "Hello World";
  6.         ?>
  7.  
  8.     </body>
  9. </html>
  10.  
  11.  
is supposed to display hello world but when i view it in a browser, all i get is a blank page.

are there any additional settings that need to be configured? or am i doing something wrong? btw, im using Notepad++ as my editor

thanks in advance
Jul 23 '10 #1

✓ answered by labmonkey111

@rotaryfreak
To get the file to run through php, you will need to access it like this:

http://localhost/hello.php

Otherwise your browser is trying to open the raw php source, and not php's output.

4 1610
JKing
1,206 Expert 1GB
@rotaryfreak
Do you have your waamp server properly configured and running?

Have you placed your php file in the right directory?

Are you accessing the file properly in your browser ie localhost/pagename.php if you have placed it in the root directory.
Jul 23 '10 #2
i think my wampserver is configured properly... i havent changed any of the default settings. The php file is in the right directly ...Wamp Server\www\hello.php and im accessing the file through Nopepad++. It has an option Run > Launch In Firefox and i can see the file location in the address bar :
file:///C:/Program Files/Wamp Server/www/hello.php
Jul 24 '10 #3
@rotaryfreak
To get the file to run through php, you will need to access it like this:

http://localhost/hello.php

Otherwise your browser is trying to open the raw php source, and not php's output.
Jul 24 '10 #4
great! it worked, thank you very much. i greatly appreciate it :)
Jul 24 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Jim | last post by:
I need some help getting started with a .NET web project for a commercial site. I am new to .NET and my understanding of some (but not all) of its concepts is a little sparse. I apologize for the...
0
by: Jim | last post by:
This si a repost, I apologize but perhaps my original inquiry got buried under all the usenet spam... I need some help getting started with a .NET web project for a commercial site. I am new to...
1
by: soni29 | last post by:
Hi, I'm going to be starting a project with a friend of mine in C#, we're doing it to learn the language a little better, to get more experience with it. We've already come up with an idea of the...
80
by: Bibby | last post by:
Hi, I'm interested in getting started in the programming world. I've dabbled in C, C++ and VB6. Which would be the best language to focus my attention to regarding the following considerations: ...
6
by: Jack Duijf | last post by:
Hello, I am looking for a person in The Netherlands that is willing to help me getting started with Vb.net. Please send a message to jack@aicn.nl if you can help me getting started with the...
6
by: nibiery | last post by:
I am just getting started with Python, and I think I may be thinking about it wrong. I'd like to be able to work interactively with some code that I've got in a file. The only interpreted language...
0
by: abillmeier | last post by:
I am just getting started messing with ASP 2.0, and am working on creating a quick data entry web hooked to a SQL database. I am using stored procedures to get and push data. I am having a...
1
by: DFBrownnz | last post by:
Hi, Can anyone help get started on working with video files? I work in the financial services industry and wanted to try this on Windows XP with C++ .Net 2003. I want to add DRM (research...
1
by: =?Utf-8?B?Q29kZVNsaW5nZXI=?= | last post by:
I plan to build my own 2008 Server/Hyper-V system and will not be using one of the tested Dell or HP systems from the release notes and could use some pointers as to my assumnptions and answers to...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.