Author Topic: SOLVED - ec-forecast.php ERROR:  (Read 260 times)

0 Members and 1 Guest are viewing this topic.

Offline bcman

  • Member
  • *
  • Posts: 1
SOLVED - ec-forecast.php ERROR:
« on: May 08, 2018, 02:54:22 PM »
ec-forecast.php ERROR:

running ec-forecast.php in its own directory works fine with no errors.

but the moment I use php include ec-forecast.php

 I get the following error:

ec-forecast.php ERROR: '' has an invalid EC page URL ''.
The corresponding XML weather data file is not found for page ID='bc-37'.

can someone give me some direction how this could be fixed?

the script:


Message from ken!
The issue is caused (I think) by the placement of the script in your filesystem (in ./dat/forecast/ ) when the page trying the include is in a different directory.  The ec-forecast.php script uses relative file addressing and since ./dat/forecast/ec-forecast.php works as standalone, perhaps the best way to use it is with either an <iframe> as you do on your /dat/index.php?p=weather page, or use something like

$txt = file_get_contents(''); print $txt;
« Last Edit: May 08, 2018, 05:37:06 PM by bcman »