duanraa1984 2016-02-23 02:26
浏览 58


I used to include files between sites routinely, until my webhost banned the practice. Now it appears that a recent PHP upgrade also tightened the screws, as I'm getting a "no suitable wrapper could be found" error - and I'm working with LOCAL sites.

Let's start with a website @ www.gx.com and a subdomain at subdomain.mysite.com. However, they display locally as two separate websites - mysite.com and subdomain.com.

A page on subdomain.com features the following include request:


$GX_URL displays as http[://]gx locally and http[://]gx.com online.

How can I modify this include so it works in both situations? I can use the following switch to hold two separate includes, one for online use and the other for local use:

 case 'Linux':

I just figured the answer to my first question; I simply mapped out the entire path to the file in the other website on my computer: /Applications/MAMP/htdocs/gx/2b/inc/D/Shared/Body/Bottom/Footer.php

So I guess I need to do something similar to include a file from my main domain. However, I'll leave this question open in case anyone has a more elegant solution.

  • 写回答

1条回答 默认 最新


      相关推荐 更多相似问题


      • ¥15 dataframe 某列数据分列
      • ¥15 风扇导入fluent后仿真压力和速度数据卡在旋转域
      • ¥15 echarts中dataZoom报错
      • ¥15 求解答:《前端综合基础》作为一门课程的话,应该包含哪些内容?
      • ¥15 软件原型系统开发+实例测试
      • ¥50 C#上位机调试Win USB
      • ¥15 java基础望榜榜 java基础望榜榜
      • ¥15 comsol 周期性端口
      • ¥15 unity导出微信小游戏的测试中双击未响应
      • ¥15 SPI驱动LORA接收端RF_BUSY