I have file index.php
, and I want to include file class.twitter.php
inside it. How can I do this?
Hopefully, when I put the below code in index.php it will work.
$t = new twitter();
$t->username = 'user';
$t->password = 'password';
$data = $t->publicTimeline();
Your code should be something like
require_once('class.twitter.php');
$t = new twitter;
$t->username = 'user';
$t->password = 'password';
$data = $t->publicTimeline();