problem with <?php echo '<p>Hello World</p>'; ?>

Problems with the Windows version of XAMPP, questions, comments, and anything related.

problem with <?php echo '<p>Hello World</p>'; ?>

Postby myola2591412a » 08. November 2010 14:05

Hi I know that this post has been covered but there is no solution to find.

I downloaded the .exe for XAMPP Windows 1.7.3 and followed the set instruction.

When finished I had port 80 problem with starting apache on the xampp control panel. My solution was to stop IIS service and I was able to start apache.

I tried the sample php program but it does not work.

Please some one help because I have spent too long looking at web pages without getting an answer
Ola
myola2591412a
 
Posts: 4
Joined: 08. November 2010 13:55

Re: problem with <?php echo '<p>Hello World</p>'; ?>

Postby myola2591412a » 08. November 2010 16:03

Hi wole
I checked this and it is sample_.php
myola2591412a
 
Posts: 4
Joined: 08. November 2010 13:55

Re: problem with <?php echo '<p>Hello World</p>'; ?>

Postby Altrea » 08. November 2010 17:25

Please describe HOW you open the php file in the Browser
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: problem with <?php echo '<p>Hello World</p>'; ?>

Postby myola2591412a » 08. November 2010 19:04

Hi Wole I tried
<?php
echo "<p>Hello World</p>";
?>

On the browser, I am able to open the xampp for windows(xampp 1.7.3) welcome page at "http://localhost/xampp/"

I tried to open the test.php using "http://xampp/htdocs/test.php".

I get Internet Explorer cannot display the webpage
myola2591412a
 
Posts: 4
Joined: 08. November 2010 13:55

Re: problem with <?php echo '<p>Hello World</p>'; ?>

Postby Altrea » 08. November 2010 19:23

myola2591412a wrote:I tried to open the test.php using "http://xampp/htdocs/test.php".


That can't work. You have to use the http protocol, there you are right. But you can't just put your full folder structure in there.
Your Webserver have a startdirectory where it starts to look for files on your computer. That folder is called DocumentRoot and is by default the htdocs folder.
The DocumentRoot Folder is automatically mapped to the computers IP. The Webserver listens on port 80 for requests.

localhost is an alias for the computers own Address.

So, if you type in your Browser http://localhost/ your Webserver automatically looks for files in c:\xampp\htdocs.
If you want to request the file test.php inside your htdocs folder the correct URL is http://localhost/test.php
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: problem with <?php echo '<p>Hello World</p>'; ?>

Postby myola2591412a » 09. November 2010 10:56

Thanks Altrea and wole
myola2591412a
 
Posts: 4
Joined: 08. November 2010 13:55


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 55 guests