Author Topic: php errors when included  (Read 355 times)

0 Members and 1 Guest are viewing this topic.

Offline Bashy

  • brecklandweather.com/meteo
  • Forecaster
  • *****
  • Posts: 1465
  • brecklandweather.com/index.php
    • Breckland Weather
php errors when included
« on: May 02, 2020, 05:42:29 AM »
Hi folks, i have a load of php errors when the page is used as a "required", it works fine when stand alone, any ideas please?

http://www.brecklandweather.com/index.php?p=918&lang=en

And the original is at

http://www.brecklandweather.com/wxsim_wxall/sivu2.php

Thanks
Kind regards
Bashy

Online wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: php errors when included
« Reply #1 on: May 02, 2020, 05:53:13 AM »
Hi folks, i have a load of php errors when the page is used as a "required", it works fine when stand alone, any ideas please?
http://www.brecklandweather.com/index.php?p=918&lang=en
And the original is at
http://www.brecklandweather.com/wxsim_wxall/sivu2.php
Thanks

You better not use PHP to include (require) an external / stand-alone script in another environment/template  as the locations of supporting files such as scripts/ icons will be invalid for the included script.

You better run http://www.brecklandweather.com/wxsim_wxall/sivu2.php inside an iframe in your template.
That way that script will find all needed files as it thinks is it running stand-alone.

Wim