0
Fatal error: Class 'ctwitter_stream' not found in C:\wamp\www\twitter.tld\index.php on line 11
這是我的代碼爲什麼我收到此錯誤
<?php
require 'ctwitter_stream.php';
$t = new ctwitter_stream();
$t->login("x", "y", "z", "z");
$t->start(array('facebook', 'fbook', 'fb'));
?>
但在同一目錄中我已經得到了文件ctwitter_stream.php
。
class ctwitter_stream
{
private $m_oauth_consumer_key;
private $m_oauth_consumer_secret;
private $m_oauth_token;
private $m_oauth_token_secret;
private $m_oauth_nonce;
private $m_oauth_signature;
private $m_oauth_signature_method = 'HMAC-SHA1';
private $m_oauth_timestamp;
private $m_oauth_version = '1.0';
public function __construct()
{
//
// set a time limit to unlimited
//
set_time_limit(0);
}
你的ctwitter_stream.php,你已經用'<?php'開始這個文件了吧? – 2014-09-03 09:34:55
嘗試'require __DIR __。'/ ctwitter_stream.php';'。如果您仍然收到錯誤,那麼該文件不在同一目錄中或不可讀。 – 2014-09-03 09:36:08