> フロント機能 > eccubeのphpファイル内でのインクルード文に関してのご質問 |
フロント機能
フラット表示 | 前のトピック | 次のトピック |
投稿者 | スレッド |
---|---|
bio |
投稿日時: 2016/3/30 15:16
対応状況: −−−
|
一人前 登録日: 2013/3/13 居住地: 投稿: 81 |
Re: eccubeのphpファイル内でのインクルード文に関してのご質問 お世話になっております。
新たに設定したブロックを呼び出すphpファイル内で使うクエリーのwhere句でif、elseifを多用して条件分岐をしています。その条件分岐が多すぎる、および他のファイルでも使用可能という理由からインクルードにしました。phpファイル(LC_Page_FrontParts_Bloc_Product_List.php)内から*自作したif,elseif文を多用したインクルードファイルを呼び出すための正しい記述方法をお教え願いませんでしょうか。 以下は試したインクルードの記述とエラーメッセージ。 ? <!--{include_php file=$smarty.const.HTML_PATH|cat:"pages/frontparts/test.php"}--> 上記の記述では以下のようなエラーメッセージが出ます。 error(E_PARSE): syntax error, unexpected '<' on [/var/www/vhosts/xxxx/httpdocs/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Product_List.php(136)] from customer_id = ? include(‘/frontparts/test.php’); 上記の記述では 2016/03/30 14:27:17 [/products/detail.php] Warning(E_WARNING): include(/frontparts/test.php) [<a href='function.include'>function.include</a>]: failed to open stream: そのようなファイルやディレクトリはありません on [/var/www/vhosts/xxxxx/httpdocs/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Product_List.php(137)] from 2016/03/30 14:27:17 [/products/detail.php] Warning(E_WARNING): include() [<a href='function.include'>function.include</a>]: Failed opening '/frontparts/test.php' for inclusion (include_path='/var/www/vhosts/xxxxx/httpdocs/data/module:.:') on [/var/www/vhosts/xxxxxx/httpdocs/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Product_List.php(137)] from * Test.php(自作したインクルードファイル内の内容) <?php If { }else if { }else if { }else if { }else if { ・・ ・・ } ?> |
フラット表示 | 前のトピック | 次のトピック |
題名 | 投稿者 | 日時 |
---|---|---|
eccubeのphpファイル内でのインクルード文に関してのご質問 | bio | 2016/3/27 0:25 |
» Re: eccubeのphpファイル内でのインクルード文に関してのご質問 | bio | 2016/3/30 15:16 |
Re: eccubeのphpファイル内でのインクルード文に関してのご質問 | red | 2016/3/30 15:59 |
Re: eccubeのphpファイル内でのインクルード文に関してのご質問 | bio | 2016/3/30 16:31 |
Re: eccubeのphpファイル内でのインクルード文に関してのご質問 | red | 2016/3/30 16:52 |
Re: eccubeのphpファイル内でのインクルード文に関してのご質問 | bio | 2016/3/30 17:54 |
Re: eccubeのphpファイル内でのインクルード文に関してのご質問 | red | 2016/3/30 18:41 |
Re: eccubeのphpファイル内でのインクルード文に関してのご質問 | bio | 2016/3/30 19:16 |
Re: eccubeのphpファイル内でのインクルード文に関してのご質問 | red | 2016/3/30 19:23 |
Re: eccubeのphpファイル内でのインクルード文に関してのご質問 | bio | 2016/3/30 21:48 |