Home >Backend Development >PHP Tutorial > PHP 能跨域名调用动态文件吗?该怎么处理

PHP 能跨域名调用动态文件吗?该怎么处理

WBOY
WBOYOriginal
2016-06-13 13:40:051140browse

PHP 能跨域名调用动态文件吗?
请问PHP能跨域名调用动态文件吗?
例如有网站www.a.com 和网站www.b.com,A网站里面php文件能包含B网站里面的PHP文件吗?


------解决方案--------------------
用file_get_contents试试
------解决方案--------------------
B做接口供A调用比较好


功能上来说,也可以A开启allow_url_include,B端直接包含相应的文件,,,目标文件要直接输出所需的php代码

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