How to obtain data from different projects on the same server?

WBOY
Release: 2016-07-06 13:51:47
Original
920 people have browsed it

Yes, there are two projects now. I want to display some data in the second project in the first project; for example, I want to display the to-do files and the number of to-do files in the second project; the How to achieve this?

One thing that comes to mind is CI Multiple databases can be configured in the framework and the databases can be operated, but there are too many data tables to be used and the operation is too cumbersome
The second point is, can I use itcurlGet the method in the controller in the second project and let it return the data?

Hope you can give me some advice

Reply content:

That’s it, now there are two projects. I want to display some data in the second project in the first project; for example, I want to display the to-do files and the number of to-do files in the second project; the How to achieve this?

One thing that comes to mind isCIMultiple databases can be configured in the framework and the databases can be operated, but there are too many data tables to be used and the operation is too cumbersome
The second point is, can I use itcurlGet the method in the controller in the second project and let it return the data?

Hope you can give me some advice

You can use two projects on the same machine to understand your second project as third-party support for the first project, open a restful interface in the second project, and provide it for the first project to call

Provide external interface or Soap protocol

The second project just needs to write the API interface for the first project to call

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!