<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=Development%3AWhat_happens_when_you_require_config.php</id>
	<title>Development:What happens when you require config.php - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=Development%3AWhat_happens_when_you_require_config.php"/>
	<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Development:What_happens_when_you_require_config.php&amp;action=history"/>
	<updated>2026-05-06T17:40:51Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Development:What_happens_when_you_require_config.php&amp;diff=12156&amp;oldid=prev</id>
		<title>Олег Давидович: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Development:What_happens_when_you_require_config.php&amp;diff=12156&amp;oldid=prev"/>
		<updated>2024-10-21T08:59:20Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 08:59, 21 октября 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Олег Давидович</name></author>
	</entry>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Development:What_happens_when_you_require_config.php&amp;diff=12155&amp;oldid=prev</id>
		<title>1&gt;TimHunt: New page: Most scripts in Moodle start with the line &lt;code php&gt; require_once(dirname(__FILE__) . &#039;/../../config.php&#039;); &lt;/code&gt; with an appropriate number of &#039;../&#039;s. This achieves two main things # I...</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Development:What_happens_when_you_require_config.php&amp;diff=12155&amp;oldid=prev"/>
		<updated>2009-04-14T09:17:13Z</updated>

		<summary type="html">&lt;p&gt;New page: Most scripts in Moodle start with the line &amp;lt;code php&amp;gt; require_once(dirname(__FILE__) . &amp;#039;/../../config.php&amp;#039;); &amp;lt;/code&amp;gt; with an appropriate number of &amp;#039;../&amp;#039;s. This achieves two main things # I...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Most scripts in Moodle start with the line&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
require_once(dirname(__FILE__) . &amp;#039;/../../config.php&amp;#039;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
with an appropriate number of &amp;#039;../&amp;#039;s. This achieves two main things&lt;br /&gt;
# It loads all the Moodle core library code.&lt;br /&gt;
# In initialises a lot of things like the database connection, the session, the current course, theme and language.&lt;br /&gt;
&lt;br /&gt;
The most reliable way to find out exactly what is going on is to actually go and read the code for config.php, lib/setup.php and the library functions they call. However, the following diagram gives an overview of some of the most important points.&lt;br /&gt;
&lt;br /&gt;
[[Image:Moodle_startup.png]]&lt;br /&gt;
&lt;br /&gt;
That diagram was drawn looking at the Moodle 2.0 dev code, but it should be similar for most recent version. It is about to change a lot in 2.0 dev over the next few months.&lt;br /&gt;
&lt;br /&gt;
Here is the same image as a .dia file that can be edited with the open source drawing program of the same name: [[Image:Moodle_startup.dia]].&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Development:Developer_documentation|Developer documentation]]&lt;br /&gt;
&lt;br /&gt;
{{CategoryDeveloper}}&lt;/div&gt;</summary>
		<author><name>1&gt;TimHunt</name></author>
	</entry>
</feed>