$aa="";
if($x)
{
$aa="require('one.php')";
}else
{
$aa="require('two.php')";}echo "$a";
我把问题简单化了,大概也就是这个意思,我想根据变量引用不同的页面,可是在最后面的输出出现了问题,这样会在页面上打印出来"require('one.php')",如何能不打让打印,还能引用这个页面呢?
if($x)
{
$aa="require('one.php')";
}else
{
$aa="require('two.php')";}echo "$a";
我把问题简单化了,大概也就是这个意思,我想根据变量引用不同的页面,可是在最后面的输出出现了问题,这样会在页面上打印出来"require('one.php')",如何能不打让打印,还能引用这个页面呢?
if($x)
{
$aa=require('one.php');
}else
{
$aa=require('two.php');
}
echo $a; 或许可能 为什么要用这种方式呢?
$x=0;
if($x)
{
$aa="1.php";
}else
{
$aa="2.php";
}
require($aa); 最多用这样的方式 require已经输出了