大约 6 个月前,我在我的共享主机上安装了它,直到现在它一直运行良好。
我收到此错误消息
Strict Standards: Only variables should be passed by reference in /home/hit/public_html/twando/inc/include_top.php on line 32
错误指向此代码行
$filename = array_pop(explode("/",$url_check));
这是完整的文件include_top.php
/*
Config
*/
ob_start();
include('config.php');
ob_end_clean();
/*
Includes
*/
include('class/class.mysql.php');
include('class/class.mainfuncs.php');
include('class/twitteroauth.php');
include('content/' . TWANDO_LANG . '/lang.php');
/*
URL of intall. You can override this if you wish
with a static define in config.php
*/
if (!defined(BASE_LINK_URL)) {
if ($_SERVER['HTTPS']) {$url_check = 'https://';} else {$url_check = 'http://';}
$url_check .= $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$filename = array_pop(explode("/",$url_check)); <<----Line 32 error
$url_check = str_replace($filename,"",$url_check);
define('BASE_LINK_URL',$url_check);
}
/*
Internal defines - you shouldn't need to change these
*/
define('TWANDO_VERSION','0.6');
define('TWITTER_API_LIMIT',15);
define('TWITTER_API_LIST_FW',5000);
define('TWITTER_API_USER_LOOKUP',100);
define('TABLE_ROWS_PER_PAGE',10);
define('TWITTER_TWEET_SEARCH_PP',100);
define('TWITTER_USER_SEARCH_PP',20);
/*
Start
*/
$db = new mySqlCon();
session_start();
有什么想法吗?
array_pop()
需要传递一个变量,因为在 PHP 中只有变量可以通过引用传递。你把explode("/",$url_check)
传递给array_pop()
,这不是一个变量。您可以像这样修复错误:
$array = explode("/", $url_check);
$filename = array_pop($array);
尝试添加额外的括号:
$filename = array_pop((explode("/", "http://example.com/foo/bar"))
请参阅:偶尔使用重要括号