View previous topic :: View next topic |
Author |
Message |
DarthGordolf -
Joined: 23 Jan 2006 Posts: 2
|
Posted: Mon Jan 23, 2006 12:12 am Post subject: PHP + HTML |
|
|
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 |
|
 |
olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Mon Jan 23, 2006 12:33 am Post subject: |
|
|
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 |
|
 |
DarthGordolf -
Joined: 23 Jan 2006 Posts: 2
|
Posted: Mon Jan 23, 2006 12:46 am Post subject: |
|
|
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 |
|
 |
Tom Chapman -
Joined: 09 Jul 2005 Posts: 933 Location: Australia
|
Posted: Mon Jan 23, 2006 2:06 pm Post subject: |
|
|
Actually it would have been the program that you used. Most likely Word or Notepad. |
|
Back to top |
|
 |
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Mon Jan 23, 2006 3:26 pm Post subject: |
|
|
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 |
|
 |
Tom Chapman -
Joined: 09 Jul 2005 Posts: 933 Location: Australia
|
Posted: Mon Jan 23, 2006 3:32 pm Post subject: |
|
|
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 |
|
 |
|