PHP + HTML

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
DarthGordolf
-


Joined: 23 Jan 2006
Posts: 2

PostPosted: Mon Jan 23, 2006 12:12 am    Post subject: PHP + HTML Reply with quote

I entered the following code in index.html

<html>
<head>
<title>test</title>
<body>
<?php
phpinfo();
?>
</body>
</html>


and when i navigate to http://localhost:80/ (where I have the server installed)
I cannot see the php source code OR the php version information.
Does anyone have any insight into what is wrong? is it an operator problem?
Back to top View user's profile Send private message AIM Address MSN Messenger
olly86
-


Joined: 25 Apr 2003
Posts: 993
Location: Wiltshire, UK

PostPosted: Mon Jan 23, 2006 12:33 am    Post subject: Reply with quote

the code phpinfo(); builds an entire page it's self, if php is installed properly you only need:
Code:

<?php
phpinfo();
?>

_________________
Olly
Back to top View user's profile Send private message
DarthGordolf
-


Joined: 23 Jan 2006
Posts: 2

PostPosted: Mon Jan 23, 2006 12:46 am    Post subject: Reply with quote

thanks olly!

after I posted I tried phpinfo() by itslef (<?php phpinfo(); ?>) and it didnt work. I later found out that windows, being the pain that it is, automatically put .txt at the end so it was test.php.txt, and I found out I needed to enclose the filename and the extension in quotes for it to work properly.

operator problem:P
Back to top View user's profile Send private message AIM Address MSN Messenger
Tom Chapman
-


Joined: 09 Jul 2005
Posts: 933
Location: Australia

PostPosted: Mon Jan 23, 2006 2:06 pm    Post subject: Reply with quote

Actually it would have been the program that you used. Most likely Word or Notepad.
Back to top View user's profile Send private message Visit poster's website MSN Messenger
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Mon Jan 23, 2006 3:26 pm    Post subject: Reply with quote

MrWiseOne wrote:
Actually it would have been the program that you used. Most likely Word or Notepad.


This problem only occurs if you have the "show file endings for known filetypes" disabled in folder options.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
Tom Chapman
-


Joined: 09 Jul 2005
Posts: 933
Location: Australia

PostPosted: Mon Jan 23, 2006 3:32 pm    Post subject: Reply with quote

The Inquisitor wrote:
MrWiseOne wrote:
Actually it would have been the program that you used. Most likely Word or Notepad.


This problem only occurs if you have the "show file endings for known filetypes" disabled in folder options.


Took the words out of my mouth! Nice Wrok = D
Back to top View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group