スニペットを使ってWordPress の呼び出しで確認してみました。その結果 MODx Parse Error となりました。MODxサイト展示場で
MODxとGalleryでECサイト を公開している sama55 さんが詳しいと思いますが自分なりに考察してみました。
include では htaccess などのさまざまな設定環境が変わってくる。そのため include を実行する前にカレントディレクトリなどの操作が必要ではないかということです。echo だけなら他のファイルを呼び出していないので環境は関係ない。
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: require() [function.require]: Unable to access ./wp/wp-blog-header.php
Error type/ Nr.: Warning - 2
File: /virtual/xxx/public_html/index.php
Line: 17
Line 17 source: require(’./wp/wp-blog-header.php’);
Parser timing
MySQL: 0.0023 s (12 Requests)
PHP: 0.0260 s
Total: 0.0283 s