2013-01-14 48 views
-4

自從上個早上起,我的網站上通過godaddy.com使用WP 3.2.1託管了以下錯誤。我現在知道該網站已被黑客入侵。我沒有進入WP管理CP,因爲它也配備了同樣的錯誤:解析錯誤:語法錯誤,192行中的/functions.php中的意外T_VARIABLE

Parse error: syntax error, unexpected T_VARIABLE in /home/content/xx/xxxxx/html/websites/xxxxxxxx/wp-includes/functions.php on line 192

這是代碼的PHP文件中的行:

$mm = substr($mysqlstring, 8, 2); // Mysql string Month 

任何一個可以幫助?

這是整個塊:

function size_format($bytes, $decimals = 0) { 
$quant = array(
    // ========================= Origin ==== 
    'TB' => 1099511627776, // pow(1024, 4) 
    'GB' => 1073741824,  // pow(1024, 3) 
    'MB' => 1048576,  // pow(1024, 2) 
    'kB' => 1024,   // pow(1024, 1) 
    'B ' => 1,    // pow(1024, 0) 
); 
foreach ($quant as $unit => $mag) 
    if (doubl// Mysql string Year 
$mm = substr($mysqlstring, 8, 2); // Mysql string Month 
$md = substr($mysqlstring, 5, 2); // Mysql string day 
$day = mktime(0, 0, 0, $md, $mm, $my); // The timestamp for mysqlstring day. 
$weekday = date('w', $day); // The day of the week from the timestamp 
if (!is_numeric($start_of_week)) 
    $start_of_week = get_option('start_of_week'); 

if ($weekday < $start_of_week) 
    $weekday += 7; 

$start = $day - 86400 * ($weekday - $start_of_week); // The most recent week start day on or before $day 
$end = $start + 604799; // $start + 7 days - 1 second 
return compact('start', 'end'); 
} 

/** 
* Unserialize value only if it was serialized. 
* 
* @since 2.0.0 
* 
* @param string $original Maybe unserialized original, if is needed. 
* @return mixed Unserialized data can be any type. 
*/ 
function maybe_unserialize($original) { 
    if (is_serialized($original)) // don't attempt to unserialize data that wasn't serialized going in 
     return @unserialize($original); 
    return $original; 
} 
+3

你可以發佈周圍的代碼 - 在這之前和之後幾行嗎?你爲什麼認爲你的網站被黑客入侵了? –

+0

根據我的經驗,這個錯誤通常與一個缺少分號';'的行有關。 – datasage

+2

答案很簡單:從備份恢復整個WP安裝。 –

回答

2

的行之前爲:

if (doubl// Mysql string Year 

顯然,線是不完整的,因此分析錯誤。

相關問題