include可否传值

WBOY
Release: 2016-06-13 13:16:12
Original
1074 people have browsed it

include能否传值
例如include(“xx.php”)
能否用include("xx.php?id=33")?
因为xx页面黑多要用 就做了个xx页面 原来是读取一个表中的前六条
现在要改成判断 例如:和本页面有关的前六条数据读出来
所以想include加一个传值 不知能否行?
不行的话是不是每个页面都要重新写啊?

------解决方案--------------------
根本不用传值,直接使用
test.php

PHP code

<?php $myOnlyOne = "hello world";
include_once("test2.php");

?>
<br><font color="#e78608">------解决方案--------------------</font><br>好像是不能传值 <div class="clear">
                 
              
              
        
            </div>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template