-2
でパース/予期せぬT-文字列弊社のウェブサイトは、予期せず、次のエラーを与え始める
Parse error: syntax error, unexpected T_STRING in /home3/rslade/public_html/wp-content/plugins/kocuj-sitemap/kocuj-sitemap.php on line 51
48 // initialize classes
49 $kocujSitemapPluginDir = dirname(__FILE__);
50 include $kocujSitemapPluginDir.DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARATOR.'base.class.php';
51 \KocujSitemapPlugin\Classes\Base::getInstance(__FILE__);
52 include $kocujSitemapPluginDir.DIRECTORY_SEPARATOR.'autoload.php';
53 unset($kocujSitemapPluginDir);
たちだったので、私ができることを望んでいる誰かが私たちのサイトを行うと、彼らは救済エラーを自分で解決するために、私は原因を突き止めることができませんでしたので、どんな助けでも大歓迎です。
を追加するように編集 - ここで私はWPのフォーラムを経由してプラグインの作者に連通するプラグイン
/**
* kocuj-sitemap.php
*
* @author Dominik Kocuj <[email protected]>
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2 or later
* @copyright Copyright (c) 2013-2016 Dominik Kocuj
* @package kocuj_sitemap
*/
// security
if ((!defined('ABSPATH')) || ((isset($_SERVER['SCRIPT_FILENAME'])) && (basename($_SERVER['SCRIPT_FILENAME']) === basename(__FILE__)))) {
header('HTTP/1.1 404 Not Found');
die();
}
// meta translation
if (1 === 0) {
_e('This plugin adds shortcode, widget and PHP function that prepares the sitemap which contains links to all of your posts, pages, menu items, authors, tags and custom types entries in the place where it is located. It supports excluding the selected entries. It also supports multilingual websites (by using qTranslate X plugin if exists). The sitemap is automatically generated and stored in the cache to speeds up the loading of sitemap on your website.', 'kocuj-sitemap');
}
// initialize classes
$kocujSitemapPluginDir = dirname(__FILE__);
include $kocujSitemapPluginDir.DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARATOR.'base.class.php';
\KocujSitemapPlugin\Classes\Base::getInstance(__FILE__);
include $kocujSitemapPluginDir.DIRECTORY_SEPARATOR.'autoload.php';
unset($kocujSitemapPluginDir);
/**
* Display sitemap
*
* @access public
* @param string $homeLinkText Home link text in the sitemap - default: empty
* @param string $class Sitemap class - default: empty
* @param array $exclude List of elements to exclude - it is divided into sections: "post", "category", "author", "term" - default: empty
* @return void
*/
function kocujsitemap_show_sitemap($homeLinkText = '', $class = '', array $exclude = array()) {
// show sitemap
echo \KocujSitemapPlugin\Classes\Sitemap::getInstance()->get($homeLinkText, $class, $exclude);
}
51行が間違っています。含まれているか変数が必要ですか? –
@Anantそれは大したことではありません。問題はそれが怒っている行であることを明らかにしますが、*理由はありません。 – Machavity
ありがとう、エラーメッセージは私に51行が間違っていると伝えました。私は他のt-stringエラーを調べて、間違ったアポストロフィや見出しの誤りを示しています。あなたはそれを修正する方法や、ファイルが最近変更されなかったというエラーがどのように起こったかについての洞察を得ていますか? – KivaS