バージョン選択

フォーラム

メニュー

オンライン状況

48 人のユーザが現在オンラインです。 (35 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 48
もっと...

サイト内検索

 > フロント機能 > 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

 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は89,281名です
総投稿数は110,072件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2314
5
umebius
2085
6
yuh
1819
7
h_tanaka
1652
8
red
1570
9
mcontact
1301
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
799
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.