Apache Server,PHP,主页 [英] Apache Server, PHP, home page
问题描述
我可能有几个简单的问题。
1)是否有default.php页面?网络服务器似乎支持default.htm,default.html,index.htm和index.html。
它是一个Apache服务器,我想要知道是否存在default.php
,或者如何设置它。
2)我得到一些奇怪的结果...
我的doctype.php文件包含:
<?php
$ sDoc =''<! DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Transitional // EN"
" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" ;> \\\\ n< html> \\\\ n< head> \\\\ n';;
?>
我的html文件包含:
<?php
require(''static / doctype.php'');
echo($ sDoc);
?>
该文件名为default.htm。 HTLM赠送。
<?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>
- >
所以看来我需要告诉PHP处理html,htm
文件或者我需要找到一种方法来设置apache服务器使用
a default.php或其他什么。这是正确的吗?
带有.php的页面名称扩展工作。非常感谢。
-
Jim Carlock
发布回复新闻组,谢谢。
sDoc =''<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Transitional // EN"
" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r\\\
<html>\r\\\
<head>\r\\\
'' ;
?>
我的html文件包含:
<?php
require(''static / doctype.php'');
echo(
sDoc);
?> ;
该文件名为default.htm。 HTLM赠送。
<?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>
- >
所以看来我需要告诉PHP处理html,htm
文件或者我需要找到一种方法来设置apache服务器使用
a default.php或其他什么。这是正确的吗?
带有.php的页面名称扩展工作。非常感谢。
-
Jim Carlock
发布回复新闻组,谢谢。
I have a couple easy questions possibly.
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.
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?
Pagenames with a ".php" extension do work. Thanks much.
--
Jim Carlock
Post replies to the newsgroup, thanks.
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?
Pagenames with a ".php" extension do work. Thanks much.
--
Jim Carlock
Post replies to the newsgroup, thanks.
这篇关于Apache Server,PHP,主页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!