Home > Backend Development > PHP Tutorial > require once的有关问题

require once的有关问题

WBOY
Release: 2016-06-13 11:17:50
Original
825 people have browsed it

require once的问题
假如不同连接的请求,导致后续代码里require 或require_once "1.php"后,

如果是require 是不是在处理不同连接业务时,1.php里的数据不共享?
require_once的话,共享数据.?上一个连接修改了某个1.php里某个globe后,下次连接请求时会反应出来修改?


------解决方案--------------------
处理不同连接业务时,1.php里的数据不共享
除非你的代码永久性的修改了1.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