<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: class code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Mon, 06 Oct 2008 00:02:29 GMT</pubDate>
    <description>DZone Snippets: class code</description>
    <item>
      <title>Load a PHP Class automatically upon instantiation (PHP5)</title>
      <link>http://snippets.dzone.com/posts/show/3179</link>
      <description>When you instantiate a class, it will try to load the file automatically.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;function __autoload($class_name) {&lt;br /&gt;    require_once("classes/" . $class_name . ".php");&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Usage:&lt;br /&gt;&lt;code&gt;$auth = new Auth;&lt;/code&gt;&lt;br /&gt;Will automatically load the file "classes/Auth.php"</description>
      <pubDate>Wed, 20 Dec 2006 00:23:38 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3179</guid>
      <author>alexwilliams (Alex Williams)</author>
    </item>
  </channel>
</rss>
