Help to beginer

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
vselak
Forum Newbie
Posts: 6
Joined: Fri Oct 21, 2011 10:14 am

Help to beginer

Post by vselak »

I am new in php world.I instaled php and Apasche.Wen I tiped:
<html>
<head></head>
<body>

Agent: So who do you think you are, anyhow?
<br />

<?php
// print output
echo 'Neo: I am Neo, but my people call me The One.';
?>

</body>
</html>
I get this response:
So who do you think you are, anyhow?
What is wrong?What's going on with the second line line ,where is it?
I am Neo, but my people call me The One.-The line I don't have.

What's going on with seco :banghead: :banghead: :banghead:
Last edited by vselak on Fri Oct 21, 2011 10:29 am, edited 1 time in total.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Help to beginer

Post by Celauran »

Sounds like something isn't configured properly. Check the page source in your browser. Do you see the PHP code displayed? Did you remember to give the file a .php extension?
vselak
Forum Newbie
Posts: 6
Joined: Fri Oct 21, 2011 10:14 am

Re: Help to beginer

Post by vselak »

I didn't forget to tipe php extension.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Help to beginer

Post by Celauran »

Celauran wrote:Check the page source in your browser. Do you see the PHP code displayed?
vselak
Forum Newbie
Posts: 6
Joined: Fri Oct 21, 2011 10:14 am

Re: Help to beginer

Post by vselak »

This is the page sorce:
<html>

<head></head>

<body>



Agent: So who do you think you are, anyhow?

<br />



<?php

// print output

echo 'Neo: I am Neo, but my people call me The One.';

?>



</body>

</html>
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Help to beginer

Post by Celauran »

This is what displays in your browser's View Source window, right? Not when you open the file with an editor? If that's the case, then PHP isn't configured properly. Try restarting Apache. If that doesn't resolve the issue, check the installation instructions for your OS. You may have missed a step.
vselak
Forum Newbie
Posts: 6
Joined: Fri Oct 21, 2011 10:14 am

Re: Help to beginer

Post by vselak »

I tried to instal xammp also and I hed the same problem.When I tip right click and tip the sorce code I get what I posted.When I instaled Apasch I use msi.automatic instalation.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Help to beginer

Post by Celauran »

Have you tried restarting Apache like I suggested?
vselak
Forum Newbie
Posts: 6
Joined: Fri Oct 21, 2011 10:14 am

Re: Help to beginer

Post by vselak »

I don't know how to do that.Sorry.
vselak
Forum Newbie
Posts: 6
Joined: Fri Oct 21, 2011 10:14 am

Re: Help to beginer

Post by vselak »

I maked to restart and I get the respons: No instlled sevice named "Apache2".How can I solve this problem?
Post Reply