Home > Backend Development > PHP Tutorial > 多个项目怎么方便地依赖同一套公用代码

多个项目怎么方便地依赖同一套公用代码

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 12:19:14
Original
1371 people have browsed it

多个项目如何方便地依赖同一套公用代码?
我刚接触PHP开发不久,现在要开发一个网站,打算拆分成这么几个项目:

project.core,,project.frontend,project.backend,project.api

后边几个项目要使用core项目中公用的models,helper函数等等,怎么样能够方便的做到这一点?人工复制目录除外 :)(IDE是zend studio)

谢谢大家。
------解决思路----------------------
若是一个项目(你说的一个网站),拆分成几个模块(类似你的几个项目),那么公用的东西都应该提出来单独成一个文件,各个模块都可以调用
若是分开的几个项目(独立的网站),最好还是你自己复制几个
------解决思路----------------------
当然可以,include 进来就是了
只是你得把业务逻辑理清了。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
Latest Issues
project files
From 1970-01-01 08:00:00
0
0
0
Project directory handover problem
From 1970-01-01 08:00:00
0
0
0
javascript - package.json in vue project
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template