在WordPress使用tanzaku和得到這個錯誤如何修復wordpress主題的functions.php中的錯誤「Warning:split()[function.split]:REG_EMPTY」?
警告:分流()[function.split]:在/public/wp-content/themes/tanzaku/functions.php線REG_EMPTY 232
線232的functions.php:
else {
// ... or get original size info.
$upload_path = trim(get_option('upload_path'));
$mark = substr(strrchr($upload_path, "/"), 1); // default mark is 'uploads'
$split_url = split($mark, $img_url);
if ($split_url[1] != null) {
$img_path = $upload_path . $split_url[1];
list($w, $h) = @getimagesize($img_path);
}
}
如何解決這個錯誤 「警告:拆分()[function.split]:REG_EMPTY」 從WordPress主題的functions.php的?
我不太清楚我在做什麼,但這工作$ split_url = preg_match(「#$標記(/.+)$#」,$ img_url,$ split_url); – tokyowp 2011-02-12 14:40:13