Home >Backend Development >PHP Tutorial >php include_path zendframework

php include_path zendframework

WBOY
WBOYOriginal
2016-06-23 14:36:34910browse

在php.ini中的一个设置是include_path 

  ① 我们在zendframework源码中会看到很多的require_once('Zend/....');

  ② 我们在许多网络上的教程中说:要先把zendframework解压后的文件夹中的library文件夹复制到某某路径(以C:/php为例)下,然后在php.ini修改(添加):

    include_path = "...;...;C:/php/library"

结论:

  当php执行require_once时会根据include_path指定的路径结合require_once()所给参数寻找包含过来的文件,这样就不用每次都写文件的绝对路径了

注意:

  require_once('...')中的路径分隔符要用‘/’,而不是‘\’

Statement:
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
Previous article:PHP里的@与!Next article:ngnix+php (widows下)