Home > Backend Development > PHP Tutorial > 如果变量初始化过程比较复杂,但又经常用到,通常把它存成什么文件?该怎么解决

如果变量初始化过程比较复杂,但又经常用到,通常把它存成什么文件?该怎么解决

WBOY
Release: 2016-06-13 13:37:13
Original
798 people have browsed it

如果变量初始化过程比较复杂,但又经常用到,通常把它存成什么文件?
是存成同类名的.inc.php文件吗?还是存成其他的什么文件呢?

------解决方案--------------------
你说的变量是指用户共享的还是怎的。
不太理解,一般都是只把类的定义存为文件。
------解决方案--------------------
变量经常用到 那就应该是常量了.那就弄个文件include.

------解决方案--------------------
建议学习一下面向对象编程。

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