Home > Backend Development > PHP Tutorial > php中全局变量在多个文件中引用有关问题

php中全局变量在多个文件中引用有关问题

WBOY
Release: 2016-06-13 11:52:52
Original
2266 people have browsed it

php中全局变量在多个文件中引用问题
问大家个问题:
能不能在A php文件中定义全局变量 ,B php文件引用并赋值,C php文件引用并访问,我测试了好像不行。B中赋值,C中只能看到A中的内容,看不到B改变后的值。

谢谢大家
------解决方案--------------------
当然可以,前提是
C.php

include 'A.php';<br />include 'B.php';<br />
Copy after login

B.php
include 'A.php';
Copy after login

C.php
include 'B.php';<br />
Copy after login


------解决方案--------------------
你C php 没有引用B php吧?

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