Afternoon Everyone: I apologize for this being off-topic, and if anyone has some better lists to post this to, please direct me that way. I'm running Apache and I have php3 support working. My limited understanding so far is that I can write a document with a .php3 extension, in a format similar to C and have it display that document in a web browser after performing the functions, commands, etc. outlined in the php3 document. I read through the documentation included with the php3 rpm, and tried one or two examples, which worked really well. One was a one-liner to call up system information on Apache and php3, and the other was a command to talk to a PostgreSQl database. Both worked, but, I had to specifically type in the name of the php3 file after I typed in the url for the web page in my browser. Is there anyway to make it so the page automatically gets loaded as soon as the user hits the site? I know that if you have an index.html in the directory, this will get loaded when a user goes to the site. Anyone know off hand of an HTML command that I can put in the HTML document that says load up this php3 page? Possibly both can be written in the same document, but I need to do some more reading for this. :) - Mike -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Hello Michael, on Friday, June 09, 2000 at 11:33:26 -0400, you sat in front of your keyboard and wrote:
Afternoon Everyone:
I apologize for this being off-topic, and if anyone has some better lists to post this to, please direct me that way.
I'm running Apache and I have php3 support working. My limited understanding so far is that I can write a document with a .php3 extension, in a format similar to C and have it display that document in a web browser after performing the functions, commands, etc. outlined in the php3 document.
I read through the documentation included with the php3 rpm, and tried one or two examples, which worked really well. One was a one-liner to call up system information on Apache and php3, and the other was a command to talk to a PostgreSQl database. Both worked, but, I had to specifically type in the name of the php3 file after I typed in the url for the web page in my browser. Is there anyway to make it so the page automatically gets loaded as soon as the user hits the site? I know that if you have an index.html in the directory, this will get loaded when a user goes to the site. Anyone know off hand of an HTML command that I can put in the HTML document that says load up this php3 page? Possibly both can be written in the same document, but I need to do some more reading for this. :)
You d'ont have to load PHP3 files from inside an HTML file.
PHP3 files are HTML files containing PHP3 functions enclosed in the HTML
sintax by using:
<?
...
...
...
?>
this PHP functions are then parsed by Apache and the result is sent to the
requesting user agent and displayed in your Netscape window.
But for this to work properly, the files ends with .php3 instead of .html.
Regards...
--
Jean-François Bocquet
So what you are saying is you have to have http://blah.com/index.php3 instead of http://blah.com/index.html. edit your /etc/httpd/httpd.conf file find a line which says: AddType application/x-httpd-php3 .php3 And just add .html to the end so you have AddType application/x-httpd-php3 .php3 .html Kev -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
On Sat, 10 Jun 2000, Kev Jackson wrote:
edit your /etc/httpd/httpd.conf file
find a line which says:
AddType application/x-httpd-php3 .php3
And just add .html to the end so you have
AddType application/x-httpd-php3 .php3 .html
I wouldn't recommend that 'cause then the parser expects PHP code in every html file. In fact, there will be an error message if a file with a html suffix doesn't contain at least two lines <?php ... ?> Doesn't make sense to me ... -- Anne -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Anne Forker wrote:
On Sat, 10 Jun 2000, Kev Jackson wrote:
edit your /etc/httpd/httpd.conf file
find a line which says:
AddType application/x-httpd-php3 .php3
And just add .html to the end so you have
AddType application/x-httpd-php3 .php3 .html
I wouldn't recommend that 'cause then the parser expects PHP code in every html file. In fact, there will be an error message if a file with a html suffix doesn't contain at least two lines
<?php ... ?>
Doesn't make sense to me ...
I would agree. If Mike is wanting to do what I think he's wanting to do, it would probably be best to find the DirectoryIndex line and change it to something like: DirectoryIndex index.php3 index.shtml index.html so that Apache will look for those files in that order when it wants an index file. You can also tell an HTML page to 'replace' itself with another page using the following meta tag: <meta http-equiv="refresh" content="{time to wait}; url=http://{page to load}"> Hope that helps, Chris -- Unfortunately I'm back on V90 (yeah, right) dialup for the rest of my life, so I apologise in advance for any time delay in replies. Thanks. __ _ -o)/ / (_)__ __ ____ __ Chris Reeves /\\ /__/ / _ \/ // /\ \/ / ICQ# 22219005 _\_v __/_/_//_/\_,_/ /_/\_\ -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (5)
-
aforker@ipfb.net
-
chris.reeves@iname.com
-
geeko@btinternet.com
-
mike@universe.ne.mediaone.net
-
tns01@free.fr