<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://help.x-cart.com/index.php?action=history&amp;feed=atom&amp;title=X-Cart%3AGlobal_object_variables</id>
	<title>X-Cart:Global object variables - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://help.x-cart.com/index.php?action=history&amp;feed=atom&amp;title=X-Cart%3AGlobal_object_variables"/>
	<link rel="alternate" type="text/html" href="https://help.x-cart.com/index.php?title=X-Cart:Global_object_variables&amp;action=history"/>
	<updated>2026-05-22T15:10:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.5</generator>
	<entry>
		<id>https://help.x-cart.com/index.php?title=X-Cart:Global_object_variables&amp;diff=5292&amp;oldid=prev</id>
		<title>Seyfin at 06:26, 24 December 2010</title>
		<link rel="alternate" type="text/html" href="https://help.x-cart.com/index.php?title=X-Cart:Global_object_variables&amp;diff=5292&amp;oldid=prev"/>
		<updated>2010-12-24T06:26:50Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 06:26, 24 December 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot; &gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Some of the notable globals set are:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Some of the notable globals set are:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* $xcart_dir - The top level directory of the X-Cart installation (The directory containing top.inc).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* $xcart_dir - The top level directory of the X-Cart installation (The directory containing top.inc&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.php&lt;/ins&gt;).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* $config - An array of the values from the xcart_config table in the database.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* $config - An array of the values from the xcart_config table in the database.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Seyfin</name></author>
		
	</entry>
	<entry>
		<id>https://help.x-cart.com/index.php?title=X-Cart:Global_object_variables&amp;diff=5291&amp;oldid=prev</id>
		<title>Seyfin at 06:25, 24 December 2010</title>
		<link rel="alternate" type="text/html" href="https://help.x-cart.com/index.php?title=X-Cart:Global_object_variables&amp;diff=5291&amp;oldid=prev"/>
		<updated>2010-12-24T06:25:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 06:25, 24 December 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(v4.4) When X-Cart starts up it runs index.php which then includes top.php and init.php.&amp;#160; These two files set most of the global values needed to run the rest of X-Cart's code. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(v4.4) When X-Cart starts up it runs index.php which then includes top&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.inc&lt;/ins&gt;.php and init.php.&amp;#160; These two files set most of the global values needed to run the rest of X-Cart's code.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Some of the notable globals set are:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Some of the notable globals set are:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Seyfin</name></author>
		
	</entry>
	<entry>
		<id>https://help.x-cart.com/index.php?title=X-Cart:Global_object_variables&amp;diff=5195&amp;oldid=prev</id>
		<title>Roguewave: X-Cart startup / Globals</title>
		<link rel="alternate" type="text/html" href="https://help.x-cart.com/index.php?title=X-Cart:Global_object_variables&amp;diff=5195&amp;oldid=prev"/>
		<updated>2010-12-08T15:28:41Z</updated>

		<summary type="html">&lt;p&gt;X-Cart startup / Globals&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;(v4.4) When X-Cart starts up it runs index.php which then includes top.php and init.php.  These two files set most of the global values needed to run the rest of X-Cart's code. &lt;br /&gt;
&lt;br /&gt;
Some of the notable globals set are:&lt;br /&gt;
&lt;br /&gt;
* $xcart_dir - The top level directory of the X-Cart installation (The directory containing top.inc).&lt;br /&gt;
&lt;br /&gt;
* $config - An array of the values from the xcart_config table in the database.&lt;br /&gt;
&lt;br /&gt;
* $sql_tbl - An array of all of the aliases of the X-Cart database table names.  For example the xcart_config&lt;br /&gt;
&lt;br /&gt;
Also included are the $xcart_dir/config.php and if present the $xcart_dir/config.local.php (for your custom config values).&lt;br /&gt;
&lt;br /&gt;
init.php will also load the database functions, log into the database and establish a database connection.&lt;br /&gt;
&lt;br /&gt;
If you are building a command line app to run within the X-Cart framework you can do this with the following PHP code:&lt;br /&gt;
&lt;br /&gt;
: $topDir = &amp;lt;xcart directory&amp;gt;;&lt;br /&gt;
: require_once &amp;quot;$topDir/top.inc.php&amp;quot;;&lt;br /&gt;
: require_once &amp;quot;$xcart_dir/init.php&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
By adding a &amp;quot;print_r ($GLOBALS);&amp;quot; line you can see all the globals that are created at this point.&lt;br /&gt;
&lt;br /&gt;
[[Category:X-Cart developer guide]]&lt;/div&gt;</summary>
		<author><name>Roguewave</name></author>
		
	</entry>
</feed>