drupal Web サイトにストーリー ノードを追加する PHP スクリプトがあります。
function post_to_webpage($title, $body, $teaser, $promote) {
//set the working directory to your Drupal root
chdir($_SERVER["DOCUMENT_ROOT"].'/webpage/');
//require the bootstrap include
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
//(loads everything, but doesn't render anything)
$node = new stdClass();
$node->type = 'story';
$node->title = $title;
$node->body = $body;
$node->teaser = $teaser;
$node->uid = 1;
$node->status = 1;
$node->promote = $promote;
$node->format = 2;
$node->sticky = 1;
node_save($node);
return $node->nid; }
ただし、これらのノードのコンテンツに r\n\ が頻繁に表示されます。何が原因でしょうか?
編集: 出力例:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed 前庭 ultrices ultricies。Curabitur nibh risus、mattis rhoncus dignissim vel、laoreet sit amet neque. Praesent blandit arcu et nisl ornare semper.
\r\n
\r\n
Vestibulum eleifend malesuada odio、aliquet mauris sagittis sed. Proin sit amet libero quis nibh malesuada mattis in sed urna. Nullam rutrum egestas interdum. Sed dui lorem, faucibus et sagittis in, volutpat at velit.