通过require_once()传递一个变量

时间:2016-01-28 13:51:43

标签: php

我在<xe:accordion id="accordion1"> <xe:this.treeNodes> <xe:basicContainerNode label="Container one"> <xe:this.children> <xe:basicLeafNode submitValue="Container one, choice one" label="Choice one"></xe:basicLeafNode> <xe:basicLeafNode submitValue="Container one, choice two" label="Choice two"></xe:basicLeafNode> <xe:basicLeafNode submitValue="Container one, choice three" label="Choice three"></xe:basicLeafNode> </xe:this.children> </xe:basicContainerNode> <xe:basicContainerNode label="Container two" style="height:auto !important;"> <xe:this.children> <xe:basicLeafNode submitValue="Container two, choice one" label="Choice one"></xe:basicLeafNode> <xe:basicLeafNode submitValue="Container two, choice two" label="Choice two"></xe:basicLeafNode> <xe:basicLeafNode submitValue="Container two, choice three" label="Choice three"></xe:basicLeafNode> <xe:basicLeafNode submitValue="Container two, choice one" label="Choice one"></xe:basicLeafNode> <xe:basicLeafNode submitValue="Container two, choice two" label="Choice two"></xe:basicLeafNode> <xe:basicLeafNode submitValue="Container two, choice three" label="Choice three"></xe:basicLeafNode> <xe:basicLeafNode submitValue="Container two, choice one" label="Choice one"></xe:basicLeafNode> <xe:basicLeafNode submitValue="Container two, choice two" label="Choice two"></xe:basicLeafNode> <xe:basicLeafNode submitValue="Container two, choice three" label="Choice three"></xe:basicLeafNode> </xe:this.children> </xe:basicContainerNode> <xe:basicContainerNode label="Container three"> <xe:this.children> <xe:basicLeafNode submitValue="Container three, choice one" label="Choice one"></xe:basicLeafNode> <xe:basicLeafNode submitValue="Container three, choice two" label="Choice two"></xe:basicLeafNode> <xe:basicLeafNode submitValue="Container three, choice three" label="Choice three"> </xe:basicLeafNode> </xe:this.children> </xe:basicContainerNode> </xe:this.treeNodes> </xe:accordion> 中使用此功能来调用想要的页面

index.php

我有<?php require_once adROOT_K.'/pages/'.$page.'.php'; ?> 页面和分页系统

tech_produit.php

警告是:

  

无法打开流:

中没有此类文件或目录

我做了一些搜索,我发现require_once会打开名为

的文件

echo '<a href="index.php?page=tech_produit?nmpage=' . $i . '">' . $i . '</a> ';

这就是我有错误的原因

1 个答案:

答案 0 :(得分:0)

我的错误是:我错误地使用&

而不是?

所以我替换:

echo '<a href="index.php?page=tech_produit?nmpage=' . $i . '">' . $i . '</a> ';

with:

echo '<a href="index.php?page=tech_produit&nmpage=' . $i . '">' . $i . '</a> ';