Skin/Templatevar: phpinclude
Includes a php-file into the output. The contents of the file is parsed by the PHP parser,so be careful. Nucleus skin/templatevars are not parsed! (see parsedinclude and include for other include options).
Arguments
- filename: the name of the file to be included (either relative to the position of index.php,or absolute)
Notes
- This tag is affected by the parser settings
IncludeModeandIncludePrefix - Your file will be included using the standard php
include()command. This command will be called from inside a class method,so you"ll need to declare which global variables you want to access yourself. Most of the standard variables are automatically declared global by Nucleus itself.
Skintypes
all
Examples
<%phpinclude(filename.php)%>
<%phpinclude(/home/user/myself/filename.php)%>
スキン/テンプレート変数:phpinclude
Webページ出力時に、指定されたPHPファイルを実行し、その結果を挿入します。ファイルの中身はPHPとして解釈され、実行されるので注意が必要です。また、Nucleusのスキン/テンプレート変数は展開されません。同じような変数に、取り込み時にスキン/テンプレート変数を展開するparsedincludeや、ファイルの中身をそのまま表示するincludeがあります。
引数
- 必須:
名前 値 filename 取り込むファイルの名前(index.phpからの相対位置でも絶対位置でもかまいません。)
注意
- この変数は、スキンの「一般設定」にある「Includeモード」と「Includeプリフィックス」の影響を受けます。
- ファイルはphpのコマンド
include()を使ってインクルードされます。このコマンドは内部のクラス・メソッドから呼び出されるので、Nucleus内部やプラグインで使用されているグローバル変数にアクセスしたい時は、自身でグローバル変数を宣言する必要があります。多くの標準的な変数はNucleusによって自動的にグローバルが宣言されます。
スキンタイプ
全て
例
<%phpinclude(filename.php)%>
<%phpinclude(/home/user/myself/filename.php)%>
コメント送信
Nucleusをご利用いただき、ありがとうございます。ヘルプファイルの内容について気がついた事がございましたら、コメントフォームよりご連絡ください。
いただきましたコメントは、次期バージョンの「オンラインヘルプ」に反映させてまいります。
なお、コチラでは個別対応は出来ませんので、疑問点などございましたら、サポートフォーラムへ投稿をお願いいたします。
コメント
コメントはありません