title: How to include a class in PHP
body: <p>I have file <code>index.php</code>, and I want to include file <code>class.twitter.php</code> inside it. How can I do this?</p>
  
  <p>Hopefully, when I put the below code in index.php it will work.</p>
  
  <pre><code>$t = new twitter();
  $t-&gt;username = 'user';
  $t-&gt;password = 'password';
  
  $data = $t-&gt;publicTimeline();
  </code></pre>