You are here: Re: Apache Server, PHP, home page « PHP Programming Language « IT news, forums, messages
Re: Apache Server, PHP, home page

Posted by Jerry Stuckle on 11/16/05 06:02

Jim Carlock wrote:
> "Jerry Stuckle" <jstucklex@attglobal.net> posted:
>
>>There is no "default" page in Apache, other than what
>>you specify in the httpd.conf file. Often this is index.html,
>>default.htm or similar - but it's whatever you specify.
>
>
> Thanks Jerry.
>
> Another question to anyone that has an answer...
>
> <?php
> require ("doctype.htm");
> $sDoc=$sDocType.'<html>\r\n<head>\r\n';
> $sDoc.='<title>Test.php</title>\r\n';
> $sDoc.='</head>\r\n';
> $sDoc.='<body>\r\n';
> $sDoc.='<p align="center">hello world</p>\r\n';
> $sDoc.='</body>\r\n';
> $sDoc.='</html>\r\n';
> echo ($sDoc);
> ?>
>
> How do I add a newline using PHP? Also, CAN the
> httpd.conf file be accessed via PHP? Or if there's a
> client-based (web/subweb-based) file rather than the
> system-wide based file, what's the name and can I
> get to via PHP?
>
> --
> Jim Carlock
> Post replies to the newsgroup, thanks.
>
>

httpd.conf is a system-wide configuration file. If you are on a shared
host, you don't have access to this file.

Otherwise, it is a text file so it could be read by PHP, but you're much
better off using a text editor and changing it manually (back it up
first!). Parsing it is a lot of work!

For local configuration changes, you can use .htaccess. See the Apache
doc at www.apache.org for how to use it. It's all in there.

As for the newline - you add it with \n. But HTML parsing will ignore
newline characters (you can still see them if you view the source).
Here you need to use an HTML <br>. See the HTML doc at www.w3.org.

And at least TRY to find the answer before asking questions!

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this 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

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