Results 1 to 8 of 8
Thread: php basics
-
07-16-2002, 01:50 PM #1Junior Guru
- Join Date
- Feb 2002
- Location
- Fountain Valley, CA
- Posts
- 219
php basics
I need the ability to run .html pages with embedded php. To do this, according to the documentation that I have found, I need to modify the AddType application line in httpd.conf. I need to change the line, AddType application/x-httpd-php .php .phtml, by adding .html to the end of this line.
However, it appears that I must do this site by site.
My questions are:
1. Do I need to .htm also?
2. How can I do this at a server level and avoid having to do it site by site?
3. Do I need to do this at all? Currently, if I add php code in the html page, it does nothing. So I am guessing that this is the problem and by adding .html to this line, it will parse the html page.We're all humanary stew, if we don't pledge allegiance to the Black Widow
-
07-16-2002, 02:35 PM #2Junior Guru Wannabe
- Join Date
- Jul 2002
- Location
- UK
- Posts
- 79
Why not just run .php pages with embeded HTML?
-
07-16-2002, 02:46 PM #3Junior Guru
- Join Date
- Feb 2002
- Location
- Fountain Valley, CA
- Posts
- 219
Running php pages messes up the search engines and indexing.
We're all humanary stew, if we don't pledge allegiance to the Black Widow
-
07-16-2002, 03:00 PM #4WHT Addict
- Join Date
- Jul 2002
- Posts
- 153
Steve,
Let me see if I can help you with this. Is php currently running on your system?
PHP Code:<?phpinfo(); ?>
1. No you can simply have a php page with the .php extension and not use the .htm. Its not needed as php pages can have html embedded inside them.
2. Ehhhh?
3. No. What code are you adding...maybe it does nothing.
Thanks.
-
07-16-2002, 03:29 PM #5Junior Guru
- Join Date
- Feb 2002
- Location
- Fountain Valley, CA
- Posts
- 219
I added the code and it showed a really nice PHP info page, PHP 4.1.2.
1. No debate about that.
2. We are an internet company and have been working with Yahoo, MSN, and others. It turns out that the search engines' indexes do not handle php pages very well. This is according to the "expert" that originally setup the web pages.
3. The code that I added to the html page is:
<?php
echo "Hi!"
?>
I wanted to test the php. I need to connect to MySQL and retrieve data from the database to display on the webpage. Price, Inventory Count, and Location. I was under the impression that php and MySQL was a good method to do this. Also, due the the constraints that I am working with hundreds of html pages, I simply wanted to add the php code to the pages and display the info. It can either be displayed on the page or as a popup window from a hyperlink.
Thanks for the help!We're all humanary stew, if we don't pledge allegiance to the Black Widow
-
07-16-2002, 03:33 PM #6Junior Guru
- Join Date
- Feb 2002
- Location
- Fountain Valley, CA
- Posts
- 219
Update: On one web site, it works. On the second web site, it cannot find the file. I get a File Not Found Error - The requested URL was not found on this server.
We're all humanary stew, if we don't pledge allegiance to the Black Widow
-
07-17-2002, 06:14 PM #7Junior Guru
- Join Date
- Feb 2002
- Location
- Fountain Valley, CA
- Posts
- 219
Thread is closed
We're all humanary stew, if we don't pledge allegiance to the Black Widow
-
07-17-2002, 07:06 PM #8Premium Member
- Join Date
- Mar 2001
- Location
- Ireland
- Posts
- 1,354
Originally posted by BooBoo
Running php pages messes up the search engines and indexing.Blacknight
ICANN accredited domain registrar