Reply to Re: Apache Server, PHP, home page

Your name:

Reply:


Posted by Malcolm Dew-Jones on 11/16/05 03:03

Jim Carlock (anonymous@127.0.0.1) wrote:
: I have a couple easy questions possibly.

BTW: there is at leats one apache group that would be your best bet for
apache setup questions.

: 1) Is there a default.php page? The webserver seems to
: support default.htm, default.html, index.htm and index.html.
: It's an Apache server, I'd like to know if a default.php
: exists, or how to set it.

Look in http.conf (for me that's /etc/httpd/conf/httpd.conf).

I think "DirectoryIndex" is probably what you want to investigate.


: 2) I'm getting some some strange results...

: My doctype.php file contains:

: <?php
: $sDoc='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r\n<html>\r\n<head>\r\n';
: ?>

: My html file contains:

: <?php
: require('static/doctype.php');
: echo($sDoc);
: ?>

: The file is named default.htm. The HTLM presents.

: <?php
: require('static/doctype.php');
: echo($sDoc);
: ?>
: <!--
: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
: <html>
: -->

: So it appears either I need to tell PHP to process html, htm
: files or I need to find a way to set the apache server to use
: a default.php or whatever. Is that correct?

huh?

If you setup the php module in apache then (normally) the extension .php
will be recognized by apache as indicating a file containing php.

: Pagenames with a ".php" extension do work. Thanks much.

There you go, just like I said but I hadn't read this far. Apache is
recognizing .php as php, and .html as html, correctly, just like you want
(though you don't realize that yet).

I am pretty sure the "DirectoryIndex" in your http.conf file is what you
are looking for.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация