我正在尝试使用带有以下代码的插件将博客从博客移至 wordpress。这是错误消息:
解析错误:语法错误,意外的 T_GLOBAL,在第 8 行的 /home/content/[HIDE]/wpbeginner-blogger.php 中需要 T_STRING
代码是:
{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww8980\viewh7500\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
\f0\fs24 \cf0 <?php\
global $wpdb;\
$old_url = $_GET['q'];\
if ($old_url != "") \{\
$permalink = explode("blogspot.ca", $old_url);\
$q = "SELECT guid FROM $wpdb->posts LEFT JOIN $wpdb->postmeta ".\
"ON ($wpdb->posts.ID = $wpdb->postmeta.post_id) WHERE ".\
"$wpdb->postmeta.meta_key='blogger_permalink' AND ".\
"$wpdb->postmeta.meta_value='$permalink[1]'";\
$new_url = $wpdb->get_var($q)? $wpdb->get_var($q) : "/";\
header ("HTTP/1.1 301 Moved Permanently");\
header("Location: $new_url");\
\}\
?>\
\
}
任何人都知道如何解决这个问题?