解析错误:语法错误,第192行/functions.php中的意外T_VARIABLE

时间:2013-01-14 18:26:32

标签: php wordpress

自从去年早上起,我的网站上出现了以下错误,该错误通过带有WP 3.2.1的godaddy.com主持。我现在知道该网站被黑了。我无法访问WP管理员CP,因为它也会出现同样的错误:

  

解析错误:语法错误,第192行/home/content/xx/xxxxx/html/websites/xxxxxxxx/wp-includes/functions.php中的意外T_VARIABLE

这是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;
}

1 个答案:

答案 0 :(得分:2)

之前的行是:

if ( doubl// Mysql string Year

显然,该行未完成,因此解析错误。