Author Topic: Incorporate wxgraphs into Saratoga Templates  (Read 723 times)

0 Members and 1 Guest are viewing this topic.

Offline rford

  • Member
  • *
  • Posts: 5
    • Turner Downs Weather
Incorporate wxgraphs into Saratoga Templates
« on: March 04, 2019, 10:06:06 AM »
I'm in the process of updating my graph page...I have wxgraphs working but I'm having trouble including them into the Saratoga Template.  I have them working here:

https://www.turnerdownsweather.com/wxgraphs/wxgraphs_test2.html

I tried various methods to call the script into the page but I understanding of code is very limited...so I hope someone can assist me.  I have tried the following:

<?php

include('/wxgraphs/wxgraphs_test2.html');

?>

and then:

<?php $doInclude = true; require("/wxgraphs/wxgraphs_test2.html"); ?>

My results are:  https://www.turnerdownsweather.com/testgraph.php  I know I'm missing something but can't see the forest for the trees at this time...

Thank you for looking at my post and any assistance provided.

Regards,
Ronald   ](*,)

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Incorporate wxgraphs into Saratoga Templates
« Reply #1 on: March 04, 2019, 10:42:13 AM »
The include statements are incorrect:

include('/wxgraphs/wxgraphs_test2.html');

would try to load the script from the filesystem root of the server.

You should use ./ instead of / at the start.

include('./wxgraphs/wxgraphs_test2.html');
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline rford

  • Member
  • *
  • Posts: 5
    • Turner Downs Weather
Re: Incorporate wxgraphs into Saratoga Templates
« Reply #2 on: March 04, 2019, 11:18:21 AM »
Thanks so much for the help...

Ronald

 

anything