PHP文件调用的有关问题

WBOY
Release: 2016-06-13 10:33:09
Original
799 people have browsed it

PHP文件调用的问题
再不同目录下用到同一类文件,
思路一是建立快捷方式,Linux下有个link,windows下没办法解决。这个有谁有经验的告诉我下,网上查了下,这方面没什么进度。
思路二是通过include加载。我目前试了2种,一种是直接将整个文件内容加载,但是调用类的时候,报‘您所请求的方法不存在’,而如果写class,在里面直接写include,include报错(只能写在class外面或function里),问下怎么做好呢?

------解决方案--------------------
怎么都要改东西的,要不你就把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