我有条件包含但遇到了问题。
例如,这有效
<?php if($t==3)
echo 'Foo';
else
echo 'Foo something else';
?>
这:不起作用
<?php if($t==3)
echo 'Foo';
include ('/home/path/public_html/includes/foo_one.php');
echo 'Example: one';
else
echo 'Foo something else';
include ('/home/path/public_html/includes/foo_two.php');
echo 'Example: two';
?>
你能解释一下我做错了什么吗?
或者我应该在包含中包含回声,然后只做 echo include ...blah else echo another include ...