За последние 24 часа нас посетили 18707 программистов и 1646 роботов. Сейчас ищут 957 программистов ...

Не может изменить информацию заголовка.

Тема в разделе "PHP для новичков", создана пользователем BFF, 14 янв 2009.

  1. Mr.M.I.T.

    Mr.M.I.T. Старожил

    С нами с:
    28 янв 2008
    Сообщения:
    4.586
    Симпатии:
    1
    Адрес:
    у тебя канфетка?
    PHP:
    1. <?
    2. $output='';
    3. $output.="Html code one";
    4. $output.="<br>Html Code Two";
    5. print $output;
    6. ?>
     
  2. BFF

    BFF Активный пользователь

    С нами с:
    17 ноя 2008
    Сообщения:
    49
    Симпатии:
    0
    Ни чего не получается....

    в результате имеем на экране......

    Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\oow\index.php:7) in C:\Program Files\Apache Group\Apache2\htdocs\oow\index.php on line 158
    Html code one
    Html Code Two

    а сама ошибка ссылается на строку 7 в которой расположена директива <?php
    т.е. получается, что как только в коде встречается первое включение php сразу локальный сервер шлет заголовок
    и все последующее по бубну. т.е. скорее всего в настройках локального сервера есть какая то бяка, которая это делает.

    Обойти этот эффект мне удалось, однако при использовании кода:

    PHP:
    1.    setcookie( "time" , "" , time() - 900 , "/" );
    2.      setcookie( "name" , "" , time() - 900 , "/" );
    снова имеем

    Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\oow\index.php:7) in C:\Program Files\Apache Group\Apache2\htdocs\oow\index.php on line 157

    Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\oow\index.php:7) in C:\Program Files\Apache Group\Apache2\htdocs\oow\index.php on line 158

    причем делаю:

    PHP:
    1. $output='';
    2.  $output.="Html code one";
    3.  
    4.  
    5.  
    6.    setcookie( "time" , $tm , time() + 900 , "/" );
    7.    setcookie( "name" , $user -> u_name , time() + 900 , "/" );
    8.  
    9.  $output.="<br>Html Code Two";
    10.  print $output;
    а экран вот такой:

    Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\oow\index.php:7) in C:\Program Files\Apache Group\Apache2\htdocs\oow\index.php on line 157

    Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\oow\index.php:7) in C:\Program Files\Apache Group\Apache2\htdocs\oow\index.php on line 158
    Html code one
    Html Code Two

    т.е. между HTML 1 и 2 ни чего не выводится (если не считать перевода строки, который непонятно откуда берется). 157 и 158 строки именно строки с куками....
     
  3. BFF

    BFF Активный пользователь

    С нами с:
    17 ноя 2008
    Сообщения:
    49
    Симпатии:
    0
    Причем куки не формируются. Хотя рядом приспокойно лежат куки от PHP MYAdmin т.е. он их нормально сделал и ни чего ему не помешало на этом же локальном Апаче2 и PHP5
    Чес собачий. Одно ПО работает, второе (в соседней папке) не работает. Вывод второе кривое. Вопрос в чем?
     
  4. Mr.M.I.T.

    Mr.M.I.T. Старожил

    С нами с:
    28 янв 2008
    Сообщения:
    4.586
    Симпатии:
    1
    Адрес:
    у тебя канфетка?
    http://phpfaq.ru/headers
    BFF
    а до этих строчек? может пробелы есть перед <?php
    поробуй этот код, ничего не меняя
    PHP:
    1. <?
    2.  $output='';
    3.  $output.="Go Yandex";
    4.  header("Refresh:2;url=http://yandex.ru");
    5.  $output.="<br>Sha mi go na yandex";
    6.  print $output;
    7.  ?>
     
  5. BFF

    BFF Активный пользователь

    С нами с:
    17 ноя 2008
    Сообщения:
    49
    Симпатии:
    0
    Немного потеряна чистота эксперимента т.к. я начал возиться с настройками апача...

    код работает чисто. через 2 сек мы на Яндексе.

    сейчас вставлю его в свой текст и буду тереть, пока не заработает.
     
  6. BFF

    BFF Активный пользователь

    С нами с:
    17 ноя 2008
    Сообщения:
    49
    Симпатии:
    0
    Потрясающе, если перед этим кодом стоит хоть один пробел - сливай вода ))))
    Пускаем его первым и работает.

    А теперь вопрос )))))))))))))))))))))))) а как программу писать то ))))))))))))))))) если любой HTML тег вызывает отправку сервером заголовка с данными.
     
  7. djunkie

    djunkie Активный пользователь

    С нами с:
    19 ноя 2008
    Сообщения:
    134
    Симпатии:
    0
    ну надо же как-то планировать код, а не писать как получиццо =)
     
  8. BFF

    BFF Активный пользователь

    С нами с:
    17 ноя 2008
    Сообщения:
    49
    Симпатии:
    0
    А ни кто и не пишет как получиЦЦо.
    Пишется строго по форме:

    PHP:
    1. <html>
    2. <head>
    3. <title></title>
    4. </head>
    5. <body>
    6. <?
    7.  
    8. ?>
    9. </body>
    10. </html>
    т.к. проходит множество проверок, а если ни чего не сработало, рисуем таблицу.
    т.е. тег кода PHP периоически включается и выключается, так вот первое присутствие текста перед тегом <?php вызывает отправку данных, например это банальный пробел.
    Опять же вопрос. Тот же самый скрипт работает на внешнем хостинге, читайте выше.
     
  9. Mr.M.I.T.

    Mr.M.I.T. Старожил

    С нами с:
    28 янв 2008
    Сообщения:
    4.586
    Симпатии:
    1
    Адрес:
    у тебя канфетка?
    может Smarty вам посоветовать?
     
  10. BFF

    BFF Активный пользователь

    С нами с:
    17 ноя 2008
    Сообщения:
    49
    Симпатии:
    0
    Что такое Smarty???

    Подозрение, что проблема в настройках АПАЧА.

    Дело в том, что я бился с его стартом. Дошел до того, что запуская его с ключем -w увидел что ему не нравится строка конфога: LOAD ...
    #Подключание PHP, как модуля
    LoadModule php5_module C:/Program Files/php5/php5apache2.dll

    ругался, что то что нет аргументов.... непомню уже... тогда я сделал так:
    #Подключание PHP, как модуля
    LoadModule php5_module "C:/Program Files/php5/php5apache2.dll"

    поставил в ковычках. И Апач2 стартовал.

    Но везде где я не брал этот файл настроек нет кавычек. Не тут ли собака зарылась?
    Может кто то посмотрит мои настройки Апача2?
     
  11. BFF

    BFF Активный пользователь

    С нами с:
    17 ноя 2008
    Сообщения:
    49
    Симпатии:
    0
    О компилирующем обработчике шаблонов почитаю.
    Но нужно выяснить причину почему локальный сервер и PHP5 в своей работе отличаются от внешнего хостинга, на котором все работает.
     
  12. BFF

    BFF Активный пользователь

    С нами с:
    17 ноя 2008
    Сообщения:
    49
    Симпатии:
    0
    Обратите внимание на строку 176. Апач стартует только в таком виде.

    PHP:
    1. #
    2. # Based upon the NCSA server configuration files originally by Rob McCool.
    3. #
    4. # This is the main Apache server configuration file.  It contains the
    5. # configuration directives that give the server its instructions.
    6. # See <URL:http://httpd.apache.org/docs-2.0/> for detailed information about
    7. # the directives.
    8. #
    9. # Do NOT simply read the instructions in here without understanding
    10. # what they do.  They're here only as hints or reminders.  If you are unsure
    11. # consult the online docs. You have been warned.
    12. #
    13. # The configuration directives are grouped into three basic sections:
    14. #  1. Directives that control the operation of the Apache server process as a
    15. #     whole (the 'global environment').
    16. #  2. Directives that define the parameters of the 'main' or 'default' server,
    17. #     which responds to requests that aren't handled by a virtual host.
    18. #     These directives also provide default values for the settings
    19. #     of all virtual hosts.
    20. #  3. Settings for virtual hosts, which allow Web requests to be sent to
    21. #     different IP addresses or hostnames and have them handled by the
    22. #     same Apache server process.
    23. #
    24. # Configuration and logfile names: If the filenames you specify for many
    25. # of the server's control files begin with "/" (or "drive:/" for Win32), the
    26. # server will use that explicit path.  If the filenames do *not* begin
    27. # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
    28. # with ServerRoot set to "C:/Program Files/Apache Group/Apache2" will be interpreted by the
    29. # server as "C:/Program Files/Apache Group/Apache2/logs/foo.log".
    30. #
    31. # NOTE: Where filenames are specified, you must use forward slashes
    32. # instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
    33. # If a drive letter is omitted, the drive on which Apache.exe is located
    34. # will be used by default.  It is recommended that you always supply
    35. # an explicit drive letter in absolute paths, however, to avoid
    36. # confusion.
    37. #
    38.  
    39. ### Section 1: Global Environment
    40. #
    41. # The directives in this section affect the overall operation of Apache,
    42. # such as the number of concurrent requests it can handle or where it
    43. # can find its configuration files.
    44. #
    45.  
    46. #
    47. # ServerRoot: The top of the directory tree under which the server's
    48. # configuration, error, and log files are kept.
    49. #
    50. # NOTE!  If you intend to place this on an NFS (or otherwise network)
    51. # mounted filesystem then please read the LockFile documentation (available
    52. # at <URL:http://httpd.apache.org/docs-2.0/mod/mpm_common.html#lockfile>);
    53. # you will save yourself a lot of trouble.
    54. #
    55. # Do NOT add a slash at the end of the directory path.
    56. #
    57. ServerRoot "C:/Program Files/Apache Group/Apache2"
    58.  
    59. #
    60. # ScoreBoardFile: File used to store internal server process information.
    61. # If unspecified (the default), the scoreboard will be stored in an
    62. # anonymous shared memory segment, and will be unavailable to third-party
    63. # applications.
    64. # If specified, ensure that no two invocations of Apache share the same
    65. # scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.
    66. #
    67. #ScoreBoardFile logs/apache_runtime_status
    68.  
    69. #
    70. # PidFile: The file in which the server should record its process
    71. # identification number when it starts.
    72. #
    73. PidFile logs/httpd.pid
    74.  
    75. #
    76. # Timeout: The number of seconds before receives and sends time out.
    77. #
    78. Timeout 300
    79.  
    80. #
    81. # KeepAlive: Whether or not to allow persistent connections (more than
    82. # one request per connection). Set to "Off" to deactivate.
    83. #
    84. KeepAlive On
    85.  
    86. #
    87. # MaxKeepAliveRequests: The maximum number of requests to allow
    88. # during a persistent connection. Set to 0 to allow an unlimited amount.
    89. # We recommend you leave this number high, for maximum performance.
    90. #
    91. MaxKeepAliveRequests 100
    92.  
    93. #
    94. # KeepAliveTimeout: Number of seconds to wait for the next request from the
    95. # same client on the same connection.
    96. #
    97. KeepAliveTimeout 15
    98.  
    99. ##
    100. ## Server-Pool Size Regulation (MPM specific)
    101. ##
    102.  
    103. # WinNT MPM
    104. # ThreadsPerChild: constant number of worker threads in the server process
    105. # MaxRequestsPerChild: maximum  number of requests a server process serves
    106. <IfModule mpm_winnt.c>
    107. ThreadsPerChild 250
    108. MaxRequestsPerChild  0
    109. </IfModule>
    110.  
    111. #
    112. # Listen: Allows you to bind Apache to specific IP addresses and/or
    113. # ports, instead of the default. See also the <VirtualHost>
    114. # directive.
    115. #
    116. # Change this to Listen on specific IP addresses as shown below to
    117. # prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
    118. #
    119. #Listen 12.34.56.78:80
    120. Listen 80
    121.  
    122. #
    123. # Dynamic Shared Object (DSO) Support
    124. #
    125. # To be able to use the functionality of a module which was built as a DSO you
    126. # have to place corresponding `LoadModule' lines at this location so the
    127. # directives contained in it are actually available _before_ they are used.
    128. # Statically compiled modules (those listed by `httpd -l') do not need
    129. # to be loaded here.
    130. #
    131. # Example:
    132. # LoadModule foo_module modules/mod_foo.so
    133. #
    134. LoadModule access_module modules/mod_access.so
    135. LoadModule actions_module modules/mod_actions.so
    136. LoadModule alias_module modules/mod_alias.so
    137. LoadModule asis_module modules/mod_asis.so
    138. LoadModule auth_module modules/mod_auth.so
    139. #LoadModule auth_anon_module modules/mod_auth_anon.so
    140. #LoadModule auth_dbm_module modules/mod_auth_dbm.so
    141. #LoadModule auth_digest_module modules/mod_auth_digest.so
    142. LoadModule autoindex_module modules/mod_autoindex.so
    143. #LoadModule cern_meta_module modules/mod_cern_meta.so
    144. LoadModule cgi_module modules/mod_cgi.so
    145. #LoadModule dav_module modules/mod_dav.so
    146. #LoadModule dav_fs_module modules/mod_dav_fs.so
    147. LoadModule dir_module modules/mod_dir.so
    148. LoadModule env_module modules/mod_env.so
    149. #LoadModule expires_module modules/mod_expires.so
    150. #LoadModule file_cache_module modules/mod_file_cache.so
    151. #LoadModule headers_module modules/mod_headers.so
    152. LoadModule imap_module modules/mod_imap.so
    153. LoadModule include_module modules/mod_include.so
    154. #LoadModule info_module modules/mod_info.so
    155. LoadModule isapi_module modules/mod_isapi.so
    156. LoadModule log_config_module modules/mod_log_config.so
    157. LoadModule mime_module modules/mod_mime.so
    158. #LoadModule mime_magic_module modules/mod_mime_magic.so
    159. #LoadModule proxy_module modules/mod_proxy.so
    160. #LoadModule proxy_connect_module modules/mod_proxy_connect.so
    161. #LoadModule proxy_http_module modules/mod_proxy_http.so
    162. #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
    163. LoadModule negotiation_module modules/mod_negotiation.so
    164. #LoadModule rewrite_module modules/mod_rewrite.so
    165. LoadModule setenvif_module modules/mod_setenvif.so
    166. #LoadModule speling_module modules/mod_speling.so
    167. #LoadModule status_module modules/mod_status.so
    168. #LoadModule unique_id_module modules/mod_unique_id.so
    169. LoadModule userdir_module modules/mod_userdir.so
    170. #LoadModule usertrack_module modules/mod_usertrack.so
    171. #LoadModule vhost_alias_module modules/mod_vhost_alias.so
    172. #LoadModule ssl_module modules/mod_ssl.so
    173.  
    174.  
    175. #Подключание PHP, как модуля
    176. LoadModule php5_module "C:/Program Files/php5/php5apache2.dll"
    177.  
    178. #AddModule mod_php5.c
    179. AddType application/x-httpd-php .php
    180. PHPIniDir "C:/Program Files/php5/"
    181.  
    182. #
    183. # ExtendedStatus controls whether Apache will generate "full" status
    184. # information (ExtendedStatus On) or just basic information (ExtendedStatus
    185. # Off) when the "server-status" handler is called. The default is Off.
    186. #
    187. #ExtendedStatus On
    188.  
    189. ### Section 2: 'Main' server configuration
    190. #
    191. # The directives in this section set up the values used by the 'main'
    192. # server, which responds to any requests that aren't handled by a
    193. # <VirtualHost> definition.  These values also provide defaults for
    194. # any <VirtualHost> containers you may define later in the file.
    195. #
    196. # All of these directives may appear inside <VirtualHost> containers,
    197. # in which case these default settings will be overridden for the
    198. # virtual host being defined.
    199. #
    200.  
    201. #
    202. # ServerAdmin: Your address, where problems with the server should be
    203. # e-mailed.  This address appears on some server-generated pages, such
    204. # as error documents.  e.g. [email=admin@your-domain.com]admin@your-domain.com[/email]
    205. #
    206. ServerAdmin [email=admin@exp.com]admin@exp.com[/email]
    207.  
    208. #
    209. # ServerName gives the name and port that the server uses to identify itself.
    210. # This can often be determined automatically, but we recommend you specify
    211. # it explicitly to prevent problems during startup.
    212. #
    213. # If this is not set to valid DNS name for your host, server-generated
    214. # redirections will not work.  See also the UseCanonicalName directive.
    215. #
    216. # If your host doesn't have a registered DNS name, enter its IP address here.
    217. # You will have to access it by its address anyway, and this will make
    218. # redirections work in a sensible way.
    219. #
    220. ServerName pavel.exp.com:80
    221.  
    222. #
    223. # UseCanonicalName: Determines how Apache constructs self-referencing
    224. # URLs and the SERVER_NAME and SERVER_PORT variables.
    225. # When set "Off", Apache will use the Hostname and Port supplied
    226. # by the client.  When set "On", Apache will use the value of the
    227. # ServerName directive.
    228. #
    229. UseCanonicalName Off
    230.  
    231. #
    232. # DocumentRoot: The directory out of which you will serve your
    233. # documents. By default, all requests are taken from this directory, but
    234. # symbolic links and aliases may be used to point to other locations.
    235. #
    236. DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
    237.  
    238. #
    239. # Each directory to which Apache has access can be configured with respect
    240. # to which services and features are allowed and/or disabled in that
    241. # directory (and its subdirectories).
    242. #
    243. # First, we configure the "default" to be a very restrictive set of
    244. # features.
    245. #
    246. <Directory />
    247.     Options FollowSymLinks
    248.     AllowOverride None
    249. </Directory>
    250.  
    251. #
    252. # Note that from this point forward you must specifically allow
    253. # particular features to be enabled - so if something's not working as
    254. # you might expect, make sure that you have specifically enabled it
    255. # below.
    256. #
    257.  
    258. #
    259. # This should be changed to whatever you set DocumentRoot to.
    260. #
    261. <Directory "C:/Program Files/Apache Group/Apache2/htdocs">
    262.  
    263. #
    264. # Possible values for the Options directive are "None", "All",
    265. # or any combination of:
    266. #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    267. #
    268. # Note that "MultiViews" must be named *explicitly* --- "Options All"
    269. # doesn't give it to you.
    270. #
    271. # The Options directive is both complicated and important.  Please see
    272. # [url=http://httpd.apache.org/docs-2.0/mod/core.html#options]http://httpd.apache.org/docs-2.0/mod/core.html#options[/url]
    273. # for more information.
    274. #
    275.    Options Indexes FollowSymLinks
    276.  
    277. #
    278. # AllowOverride controls what directives may be placed in .htaccess files.
    279. # It can be "All", "None", or any combination of the keywords:
    280. #   Options FileInfo AuthConfig Limit
    281. #
    282.    AllowOverride None
    283.  
    284. #
    285. # Controls who can get stuff from this server.
    286. #
    287.    Order allow,deny
    288.     Allow from all
    289.  
    290. </Directory>
    291.  
    292. #
    293. # UserDir: The name of the directory that is appended onto a user's home
    294. # directory if a ~user request is received.  Be especially careful to use
    295. # proper, forward slashes here.  On Windows NT, "Personal/My Website"
    296. # is a more appropriate choice.
    297. #
    298. UserDir "My Documents/My Website"
    299.  
    300. #
    301. # Control access to UserDir directories.  The following is an example
    302. # for a site where these directories are restricted to read-only.
    303. #
    304. # You must correct the path for the root to match your system's configured
    305. # user directory location, e.g. "C:/WinNT/profiles/*/My Documents/My Website"
    306. # or whichever, as appropriate.
    307. #
    308. #<Directory "C:/Documents and Settings/*/My Documents/My Website">
    309. #    AllowOverride FileInfo AuthConfig Limit
    310. #    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    311. #    <Limit GET POST OPTIONS PROPFIND>
    312. #        Order allow,deny
    313. #        Allow from all
    314. #    </Limit>
    315. #    <LimitExcept GET POST OPTIONS PROPFIND>
    316. #        Order deny,allow
    317. #        Deny from all
    318. #    </LimitExcept>
    319. #</Directory>
    320.  
    321. #
    322. # DirectoryIndex: sets the file that Apache will serve if a directory
    323. # is requested.
    324. #
    325. # The index.html.var file (a type-map) is used to deliver content-
    326. # negotiated documents.  The MultiViews Option can be used for the
    327. # same purpose, but it is much slower.
    328. #
    329. DirectoryIndex index.html index.html.var
    330.  
    331. #
    332. # AccessFileName: The name of the file to look for in each directory
    333. # for additional configuration directives.  See also the AllowOverride
    334. # directive.
    335. #
    336. AccessFileName .htaccess
    337.  
    338. #
    339. # The following lines prevent .htaccess and .htpasswd files from being
    340. # viewed by Web clients.
    341. #
    342. <FilesMatch "^\.ht">
    343.     Order allow,deny
    344.     Deny from all
    345. </FilesMatch>
    346.  
    347. #
    348. # TypesConfig describes where the mime.types file (or equivalent) is
    349. # to be found.
    350. #
    351. TypesConfig conf/mime.types
    352.  
    353. #
    354. # DefaultType is the default MIME type the server will use for a document
    355. # if it cannot otherwise determine one, such as from filename extensions.
    356. # If your server contains mostly text or HTML documents, "text/plain" is
    357. # a good value.  If most of your content is binary, such as applications
    358. # or images, you may want to use "application/octet-stream" instead to
    359. # keep browsers from trying to display binary files as though they are
    360. # text.
    361. #
    362. DefaultType text/plain
    363.  
    364. #
    365. # The mod_mime_magic module allows the server to use various hints from the
    366. # contents of the file itself to determine its type.  The MIMEMagicFile
    367. # directive tells the module where the hint definitions are located.
    368. #
    369. <IfModule mod_mime_magic.c>
    370.     MIMEMagicFile conf/magic
    371. </IfModule>
    372.  
    373. #
    374. # HostnameLookups: Log the names of clients or just their IP addresses
    375. # e.g., [url=http://www.apache.org]www.apache.org[/url] (on) or 204.62.129.132 (off).
    376. # The default is off because it'd be overall better for the net if people
    377. # had to knowingly turn this feature on, since enabling it means that
    378. # each client request will result in AT LEAST one lookup request to the
    379. # nameserver.
    380. #
    381. HostnameLookups Off
    382.  
    383. #
    384. # EnableMMAP: Control whether memory-mapping is used to deliver
    385. # files (assuming that the underlying OS supports it).
    386. # The default is on; turn this off if you serve from NFS-mounted
    387. # filesystems.  On some systems, turning it off (regardless of
    388. # filesystem) can improve performance; for details, please see
    389. # [url=http://httpd.apache.org/docs-2.0/mod/core.html#enablemmap]http://httpd.apache.org/docs-2.0/mod/co ... enablemmap[/url]
    390. #
    391. #EnableMMAP off
    392.  
    393. #
    394. # EnableSendfile: Control whether the sendfile kernel support is
    395. # used  to deliver files (assuming that the OS supports it).
    396. # The default is on; turn this off if you serve from NFS-mounted
    397. # filesystems.  Please see
    398. # [url=http://httpd.apache.org/docs-2.0/mod/core.html#enablesendfile]http://httpd.apache.org/docs-2.0/mod/co ... lesendfile[/url]
    399. #
    400. #EnableSendfile off
    401.  
    402. #
    403. # ErrorLog: The location of the error log file.
    404. # If you do not specify an ErrorLog directive within a <VirtualHost>
    405. # container, error messages relating to that virtual host will be
    406. # logged here.  If you *do* define an error logfile for a <VirtualHost>
    407. # container, that host's errors will be logged there and not here.
    408. #
    409. ErrorLog logs/error.log
    410.  
    411. #
    412. # LogLevel: Control the number of messages logged to the error.log.
    413. # Possible values include: debug, info, notice, warn, error, crit,
    414. # alert, emerg.
    415. #
    416. LogLevel warn
    417.  
    418. #
    419. # The following directives define some format nicknames for use with
    420. # a CustomLog directive (see below).
    421. #
    422. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    423. LogFormat "%h %l %u %t \"%r\" %>s %b" common
    424. LogFormat "%{Referer}i -> %U" referer
    425. LogFormat "%{User-agent}i" agent
    426.  
    427. # You need to enable mod_logio.c to use %I and %O
    428. #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    429.  
    430. #
    431. # The location and format of the access logfile (Common Logfile Format).
    432. # If you do not define any access logfiles within a <VirtualHost>
    433. # container, they will be logged here.  Contrariwise, if you *do*
    434. # define per-<VirtualHost> access logfiles, transactions will be
    435. # logged therein and *not* in this file.
    436. #
    437. CustomLog logs/access.log common
    438.  
    439. #
    440. # If you would like to have agent and referer logfiles, uncomment the
    441. # following directives.
    442. #
    443. #CustomLog logs/referer.log referer
    444. #CustomLog logs/agent.log agent
    445.  
    446. #
    447. # If you prefer a single logfile with access, agent, and referer information
    448. # (Combined Logfile Format) you can use the following directive.
    449. #
    450. #CustomLog logs/access.log combined
    451.  
    452. #
    453. # ServerTokens
    454. # This directive configures what you return as the Server HTTP response
    455. # Header. The default is 'Full' which sends information about the OS-Type
    456. # and compiled in modules.
    457. # Set to one of:  Full | OS | Minor | Minimal | Major | Prod
    458. # where Full conveys the most information, and Prod the least.
    459. #
    460. ServerTokens Full
    461.  
    462. #
    463. # Optionally add a line containing the server version and virtual host
    464. # name to server-generated pages (internal error documents, FTP directory
    465. # listings, mod_status and mod_info output etc., but not CGI generated
    466. # documents or custom error documents).
    467. # Set to "EMail" to also include a mailto: link to the ServerAdmin.
    468. # Set to one of:  On | Off | EMail
    469. #
    470. ServerSignature On
    471.  
    472. #
    473. # Aliases: Add here as many aliases as you need (with no limit). The format is
    474. # Alias fakename realname
    475. #
    476. # Note that if you include a trailing / on fakename then the server will
    477. # require it to be present in the URL.  So "/icons" isn't aliased in this
    478. # example, only "/icons/".  If the fakename is slash-terminated, then the
    479. # realname must also be slash terminated, and if the fakename omits the
    480. # trailing slash, the realname must also omit it.
    481. #
    482. # We include the /icons/ alias for FancyIndexed directory listings.  If you
    483. # do not use FancyIndexing, you may comment this out.
    484. #
    485. Alias /icons/ "C:/Program Files/Apache Group/Apache2/icons/"
    486.  
    487. <Directory "C:/Program Files/Apache Group/Apache2/icons">
    488.     Options Indexes MultiViews
    489.     AllowOverride None
    490.     Order allow,deny
    491.     Allow from all
    492. </Directory>
    493.  
    494. #
    495. # This should be changed to the ServerRoot/manual/.  The alias provides
    496. # the manual, even if you choose to move your DocumentRoot.  You may comment
    497. # this out if you do not care for the documentation.
    498. #
    499. AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "C:/Program Files/Apache Group/Apache2/manual$1"
    500.  
    501. <Directory "C:/Program Files/Apache Group/Apache2/manual">
    502.     Options Indexes
    503.     AllowOverride None
    504.     Order allow,deny
    505.     Allow from all
    506.  
    507.     <Files *.html>
    508.         SetHandler type-map
    509.     </Files>
    510.  
    511.     SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|ru)/ prefer-language=$1
    512.     RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2
    513. </Directory>
    514.  
    515. #
    516. # ScriptAlias: This controls which directories contain server scripts.
    517. # ScriptAliases are essentially the same as Aliases, except that
    518. # documents in the realname directory are treated as applications and
    519. # run by the server when requested rather than as documents sent to the client.
    520. # The same rules about trailing "/" apply to ScriptAlias directives as to
    521. # Alias.
    522. #
    523. ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache2/cgi-bin/"
    524.  
    525. #
    526. # "C:/Program Files/Apache Group/Apache2/cgi-bin" should be changed to whatever your ScriptAliased
    527. # CGI directory exists, if you have that configured.
    528. #
    529. <Directory "C:/Program Files/Apache Group/Apache2/cgi-bin">
    530.     AllowOverride None
    531.     Options None
    532.     Order allow,deny
    533.     Allow from all
    534. </Directory>
    535.  
    536. #
    537. # Redirect allows you to tell clients about documents which used to exist in
    538. # your server's namespace, but do not anymore. This allows you to tell the
    539. # clients where to look for the relocated document.
    540. # Example:
    541. # Redirect permanent /foo [url=http://www.example.com/bar]http://www.example.com/bar[/url]
    542.  
    543. #
    544. # Directives controlling the display of server-generated directory listings.
    545. #
    546.  
    547. #
    548. # IndexOptions: Controls the appearance of server-generated directory
    549. # listings.
    550. #
    551. IndexOptions FancyIndexing VersionSort
    552.  
    553. #
    554. # AddIcon* directives tell the server which icon to show for different
    555. # files or filename extensions.  These are only displayed for
    556. # FancyIndexed directories.
    557. #
    558. AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
    559.  
    560. AddIconByType (TXT,/icons/text.gif) text/*
    561. AddIconByType (IMG,/icons/image2.gif) image/*
    562. AddIconByType (SND,/icons/sound2.gif) audio/*
    563. AddIconByType (VID,/icons/movie.gif) video/*
    564.  
    565. AddIcon /icons/binary.gif .bin .exe
    566. AddIcon /icons/binhex.gif .hqx
    567. AddIcon /icons/tar.gif .tar
    568. AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
    569. AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
    570. AddIcon /icons/a.gif .ps .ai .eps
    571. AddIcon /icons/layout.gif .html .shtml .htm .pdf
    572. AddIcon /icons/text.gif .txt
    573. AddIcon /icons/c.gif .c
    574. AddIcon /icons/p.gif .pl .py
    575. AddIcon /icons/f.gif .for
    576. AddIcon /icons/dvi.gif .dvi
    577. AddIcon /icons/uuencoded.gif .uu
    578. AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
    579. AddIcon /icons/tex.gif .tex
    580. AddIcon /icons/bomb.gif core
    581.  
    582. AddIcon /icons/back.gif ..
    583. AddIcon /icons/hand.right.gif README
    584. AddIcon /icons/folder.gif ^^DIRECTORY^^
    585. AddIcon /icons/blank.gif ^^BLANKICON^^
    586.  
    587. #
    588. # DefaultIcon is which icon to show for files which do not have an icon
    589. # explicitly set.
    590. #
    591. DefaultIcon /icons/unknown.gif
    592.  
    593. #
    594. # AddDescription allows you to place a short description after a file in
    595. # server-generated indexes.  These are only displayed for FancyIndexed
    596. # directories.
    597. # Format: AddDescription "description" filename
    598. #
    599. #AddDescription "GZIP compressed document" .gz
    600. #AddDescription "tar archive" .tar
    601. #AddDescription "GZIP compressed tar archive" .tgz
    602.  
    603. #
    604. # ReadmeName is the name of the README file the server will look for by
    605. # default, and append to directory listings.
    606. #
    607. # HeaderName is the name of a file which should be prepended to
    608. # directory indexes.
    609. ReadmeName README.html
    610. HeaderName HEADER.html
    611.  
    612. #
    613. # IndexIgnore is a set of filenames which directory indexing should ignore
    614. # and not include in the listing.  Shell-style wildcarding is permitted.
    615. #
    616. IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
    617.  
    618. #
    619. # DefaultLanguage and AddLanguage allows you to specify the language of
    620. # a document. You can then use content negotiation to give a browser a
    621. # file in a language the user can understand.
    622. #
    623. # Specify a default language. This means that all data
    624. # going out without a specific language tag (see below) will
    625. # be marked with this one. You probably do NOT want to set
    626. # this unless you are sure it is correct for all cases.
    627. #
    628. # * It is generally better to not mark a page as
    629. # * being a certain language than marking it with the wrong
    630. # * language!
    631. #
    632. # DefaultLanguage nl
    633. #
    634. # Note 1: The suffix does not have to be the same as the language
    635. # keyword --- those with documents in Polish (whose net-standard
    636. # language code is pl) may wish to use "AddLanguage pl .po" to
    637. # avoid the ambiguity with the common suffix for perl scripts.
    638. #
    639. # Note 2: The example entries below illustrate that in some cases
    640. # the two character 'Language' abbreviation is not identical to
    641. # the two character 'Country' code for its country,
    642. # E.g. 'Danmark/dk' versus 'Danish/da'.
    643. #
    644. # Note 3: In the case of 'ltz' we violate the RFC by using a three char
    645. # specifier. There is 'work in progress' to fix this and get
    646. # the reference data for rfc1766 cleaned up.
    647. #
    648. # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
    649. # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
    650. # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
    651. # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
    652. # Norwegian (no) - Polish (pl) - Portugese (pt)
    653. # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
    654. # Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
    655. #
    656. AddLanguage ca .ca
    657. AddLanguage cs .cz .cs
    658. AddLanguage da .dk
    659. AddLanguage de .de
    660. AddLanguage el .el
    661. AddLanguage en .en
    662. AddLanguage eo .eo
    663. AddLanguage es .es
    664. AddLanguage et .et
    665. AddLanguage fr .fr
    666. AddLanguage he .he
    667. AddLanguage hr .hr
    668. AddLanguage it .it
    669. AddLanguage ja .ja
    670. AddLanguage ko .ko
    671. AddLanguage ltz .ltz
    672. AddLanguage nl .nl
    673. AddLanguage nn .nn
    674. AddLanguage no .no
    675. AddLanguage pl .po
    676. AddLanguage pt .pt
    677. AddLanguage pt-BR .pt-br
    678. AddLanguage ru .ru
    679. AddLanguage sv .sv
    680. AddLanguage zh-CN .zh-cn
    681. AddLanguage zh-TW .zh-tw
    682.  
    683. #
    684. # LanguagePriority allows you to give precedence to some languages
    685. # in case of a tie during content negotiation.
    686. #
    687. # Just list the languages in decreasing order of preference. We have
    688. # more or less alphabetized them here. You probably want to change this.
    689. #
    690. LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
    691.  
    692. #
    693. # ForceLanguagePriority allows you to serve a result page rather than
    694. # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
    695. # [in case no accepted languages matched the available variants]
    696. #
    697. ForceLanguagePriority Prefer Fallback
    698.  
    699. #
    700. # Commonly used filename extensions to character sets. You probably
    701. # want to avoid clashes with the language extensions, unless you
    702. # are good at carefully testing your setup after each change.
    703. # See [url=http://www.iana.org/assignments/character-sets]http://www.iana.org/assignments/character-sets[/url] for the
    704. # official list of charset names and their respective RFCs.
    705. #
    706. AddCharset ISO-8859-1  .iso8859-1 .latin1
    707. AddCharset ISO-8859-2  .iso8859-2 .latin2 .cen
    708. AddCharset ISO-8859-3  .iso8859-3 .latin3
    709. AddCharset ISO-8859-4  .iso8859-4 .latin4
    710. AddCharset ISO-8859-5  .iso8859-5 .latin5 .cyr .iso-ru
    711. AddCharset ISO-8859-6  .iso8859-6 .latin6 .arb
    712. AddCharset ISO-8859-7  .iso8859-7 .latin7 .grk
    713. AddCharset ISO-8859-8  .iso8859-8 .latin8 .heb
    714. AddCharset ISO-8859-9  .iso8859-9 .latin9 .trk
    715. AddCharset ISO-2022-JP .iso2022-jp .jis
    716. AddCharset ISO-2022-KR .iso2022-kr .kis
    717. AddCharset ISO-2022-CN .iso2022-cn .cis
    718. AddCharset Big5        .Big5       .big5
    719. # For russian, more than one charset is used (depends on client, mostly):
    720. AddCharset WINDOWS-1251 .cp-1251   .win-1251
    721. AddCharset CP866       .cp866
    722. AddCharset KOI8-r      .koi8-r .koi8-ru
    723. AddCharset KOI8-ru     .koi8-uk .ua
    724. AddCharset ISO-10646-UCS-2 .ucs2
    725. AddCharset ISO-10646-UCS-4 .ucs4
    726. AddCharset UTF-8       .utf8
    727.  
    728. # The set below does not map to a specific (iso) standard
    729. # but works on a fairly wide range of browsers. Note that
    730. # capitalization actually matters (it should not, but it
    731. # does for some browsers).
    732. #
    733. # See [url=http://www.iana.org/assignments/character-sets]http://www.iana.org/assignments/character-sets[/url]
    734. # for a list of sorts. But browsers support few.
    735. #
    736. AddCharset GB2312      .gb2312 .gb
    737. AddCharset utf-7       .utf7
    738. AddCharset utf-8       .utf8
    739. AddCharset big5        .big5 .b5
    740. AddCharset EUC-TW      .euc-tw
    741. AddCharset EUC-JP      .euc-jp
    742. AddCharset EUC-KR      .euc-kr
    743. AddCharset shift_jis   .sjis
    744.  
    745. #
    746. # AddType allows you to add to or override the MIME configuration
    747. # file mime.types for specific file types.
    748. #
    749. #AddType application/x-tar .tgz
    750. #
    751. # AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
    752. # information on the fly. Note: Not all browsers support this.
    753. # Despite the name similarity, the following Add* directives have nothing
    754. # to do with the FancyIndexing customization directives above.
    755. #
    756. #AddEncoding x-compress .Z
    757. #AddEncoding x-gzip .gz .tgz
    758. #
    759. # If the AddEncoding directives above are commented-out, then you
    760. # probably should define those extensions to indicate media types:
    761. #
    762. AddType application/x-compress .Z
    763. AddType application/x-gzip .gz .tgz
    764.  
    765. #
    766. # AddHandler allows you to map certain file extensions to "handlers":
    767. # actions unrelated to filetype. These can be either built into the server
    768. # or added with the Action directive (see below)
    769. #
    770. # To use CGI scripts outside of ScriptAliased directories:
    771. # (You will also need to add "ExecCGI" to the "Options" directive.)
    772. #
    773. #AddHandler cgi-script .cgi
    774.  
    775. #
    776. # For files that include their own HTTP headers:
    777. #
    778. #AddHandler send-as-is asis
    779.  
    780. #
    781. # For server-parsed imagemap files:
    782. #
    783. #AddHandler imap-file map
    784.  
    785. #
    786. # For type maps (negotiated resources):
    787. # (This is enabled by default to allow the Apache "It Worked" page
    788. #  to be distributed in multiple languages.)
    789. #
    790. AddHandler type-map var
    791.  
    792. #
    793. # Filters allow you to process content before it is sent to the client.
    794. #
    795. # To parse .shtml files for server-side includes (SSI):
    796. # (You will also need to add "Includes" to the "Options" directive.)
    797. #
    798. #AddType text/html .shtml
    799. #AddOutputFilter INCLUDES .shtml
    800.  
    801. #
    802. # Action lets you define media types that will execute a script whenever
    803. # a matching file is called. This eliminates the need for repeated URL
    804. # pathnames for oft-used CGI file processors.
    805. # Format: Action media/type /cgi-script/location
    806. # Format: Action handler-name /cgi-script/location
    807. #
    808.  
    809. #
    810. # Customizable error responses come in three flavors:
    811. # 1) plain text 2) local redirects 3) external redirects
    812. #
    813. # Some examples:
    814. #ErrorDocument 500 "The server made a boo boo."
    815. #ErrorDocument 404 /missing.html
    816. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
    817. #ErrorDocument 402 [url=http://www.example.com/subscription_info.html]http://www.example.com/subscription_info.html[/url]
    818. #
    819.  
    820. #
    821. # Putting this all together, we can internationalize error responses.
    822. #
    823. # We use Alias to redirect any /error/HTTP_<error>.html.var response to
    824. # our collection of by-error message multi-language collections.  We use
    825. # includes to substitute the appropriate text.
    826. #
    827. # You can modify the messages' appearance without changing any of the
    828. # default HTTP_<error>.html.var files by adding the line:
    829. #
    830. #   Alias /error/include/ "/your/include/path/"
    831. #
    832. # which allows you to create your own set of files by starting with the
    833. # @exp_errordir@/include/ files and copying them to /your/include/path/,
    834. # even on a per-VirtualHost basis.  The default include files will display
    835. # your Apache version number and your ServerAdmin email address regardless
    836. # of the setting of ServerSignature.
    837. #
    838. # The internationalized error documents require mod_alias, mod_include
    839. # and mod_negotiation.  To activate them, uncomment the following 30 lines.
    840.  
    841. #    Alias /error/ "@exp_errordir@/"
    842. #
    843. #    <Directory "@exp_errordir@">
    844. #        AllowOverride None
    845. #        Options IncludesNoExec
    846. #        AddOutputFilter Includes html
    847. #        AddHandler type-map var
    848. #        Order allow,deny
    849. #        Allow from all
    850. #        LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr
    851. #        ForceLanguagePriority Prefer Fallback
    852. #    </Directory>
    853. #
    854. #    ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
    855. #    ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
    856. #    ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
    857. #    ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
    858. #    ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
    859. #    ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
    860. #    ErrorDocument 410 /error/HTTP_GONE.html.var
    861. #    ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
    862. #    ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
    863. #    ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
    864. #    ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
    865. #    ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
    866. #    ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
    867. #    ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
    868. #    ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
    869. #    ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
    870. #    ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
    871.  
    872.  
    873.  
    874. #
    875. # The following directives modify normal HTTP response behavior to
    876. # handle known problems with browser implementations.
    877. #
    878. BrowserMatch "Mozilla/2" nokeepalive
    879. BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
    880. BrowserMatch "RealPlayer 4\.0" force-response-1.0
    881. BrowserMatch "Java/1\.0" force-response-1.0
    882. BrowserMatch "JDK/1\.0" force-response-1.0
    883.  
    884. #
    885. # The following directive disables redirects on non-GET requests for
    886. # a directory that does not include the trailing slash.  This fixes a
    887. # problem with Microsoft WebFolders which does not appropriately handle
    888. # redirects for folders with DAV methods.
    889. # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
    890. #
    891. BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
    892. BrowserMatch "MS FrontPage" redirect-carefully
    893. BrowserMatch "^WebDrive" redirect-carefully
    894. BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
    895. BrowserMatch "^gnome-vfs" redirect-carefully
    896. BrowserMatch "^XML Spy" redirect-carefully
    897. BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
    898.  
    899. #
    900. # Allow server status reports generated by mod_status,
    901. # with the URL of [url=http://servername/server-status]http://servername/server-status[/url]
    902. # Change the ".exp.com" to match your domain to enable.
    903. #
    904. #<Location /server-status>
    905. #    SetHandler server-status
    906. #    Order deny,allow
    907. #    Deny from all
    908. #    Allow from .exp.com
    909. #</Location>
    910.  
    911. #
    912. # Allow remote server configuration reports, with the URL of
    913. #  [url=http://servername/server-info]http://servername/server-info[/url] (requires that mod_info.c be loaded).
    914. # Change the ".exp.com" to match your domain to enable.
    915. #
    916. #<Location /server-info>
    917. #    SetHandler server-info
    918. #    Order deny,allow
    919. #    Deny from all
    920. #    Allow from .exp.com
    921. #</Location>
    922.  
    923.  
    924. #
    925. # Bring in additional module-specific configurations
    926. #
    927. <IfModule mod_ssl.c>
    928.     Include conf/ssl.conf
    929. </IfModule>
    930.  
    931.  
    932. ### Section 3: Virtual Hosts
    933. #
    934. # VirtualHost: If you want to maintain multiple domains/hostnames on your
    935. # machine you can setup VirtualHost containers for them. Most configurations
    936. # use only name-based virtual hosts so the server doesn't need to worry about
    937. # IP addresses. This is indicated by the asterisks in the directives below.
    938. #
    939. # Please see the documentation at
    940. # <URL:http://httpd.apache.org/docs-2.0/vhosts/>
    941. # for further details before you try to setup virtual hosts.
    942. #
    943. # You may use the command line option '-S' to verify your virtual host
    944. # configuration.
    945.  
    946. #
    947. # Use name-based virtual hosting.
    948. #
    949. #NameVirtualHost *:80
    950.  
    951. #
    952. # VirtualHost example:
    953. # Almost any Apache directive may go into a VirtualHost container.
    954. # The first VirtualHost section is used for requests without a known
    955. # server name.
    956. #
    957. #<VirtualHost *:80>
    958. #    ServerAdmin [email=webmaster@dummy-host.example.com]webmaster@dummy-host.example.com[/email]
    959. #    DocumentRoot /www/docs/dummy-host.example.com
    960. #    ServerName dummy-host.example.com
    961. #    ErrorLog logs/dummy-host.example.com-error_log
    962. #    CustomLog logs/dummy-host.example.com-access_log common
    963. #</VirtualHost>
    964.  
     
  13. Mr.M.I.T.

    Mr.M.I.T. Старожил

    С нами с:
    28 янв 2008
    Сообщения:
    4.586
    Симпатии:
    1
    Адрес:
    у тебя канфетка?
    а вообще могу привести скромный пример каркаса сайта
    PHP:
    1. <?
    2. $result=array();
    3. $act=!empty($_GET['act'])?$_GET['act']:false;
    4. $result['linkbar'][]=array("link"=>"/","name"=>"Main Page");
    5. if($act){
    6.   if(file_exists("moduls/".$act)) {
    7.         $result['linkbar'][]=array("link"=>"/","name"=>$act);
    8.         include "moduls/{$act}.php";
    9.   }else{
    10.         $result['title']="Fatal Error";
    11.         $result['error']="Ошибка, модуль не найден";
    12.   }
    13. }else{
    14.    $result['title']="Default Title";
    15.    $result['content']="Default content Html";
    16. }
    17. ?>
    18.     <html>
    19.     <head>
    20.     <title><?=$result['title'];?></title>
    21.    </head>
    22.    <body>
    23.     <?foreach($result['linkbar'] as $key=>$link){?>
    24.               <a href="<?=$link['link'];?>"><?=$link['name'];?></a> /
    25.     <?}?>
    26.      <?if($result['error']){?>
    27.          <div style='border:1px solid red;'><?=$result['error'];?></div><br>
    28.      <?}?>
    29.      <?=$result['content'];?>
    30.  </body>
    31.  </html>
     
  14. BFF

    BFF Активный пользователь

    С нами с:
    17 ноя 2008
    Сообщения:
    49
    Симпатии:
    0
    Это очень поможет. Благодарствуем.
    Пожалуй это много изменит.