WXforum.net
Web Weather => Weather Website PHP/AJAX scripting => Topic started by: meteosanjuan on April 17, 2024, 01:26:50 PM
-
In order to make some order in the root folder where the website is stored, I decided to move the graphs generated by weather display in the Daily Report for the month (wxhistory.php)
So create a folder “daily graphics” and after moving the gifs change the path to
$wxh_graphs_path = './daily_graphs/';
Since the graph was too big, I added the width and height="600" clauses, which I really don't know if it's recommended.
And the result is that it works, however I can't figure out where to indicate that the gifs that weather display uploads do so to the folder I want, it uploads them to the root.
Can anyone tell me how to do it?
The site is https://www.meteosanjuan.com/wxhistory.php
Thank you
-
Hi,
Have you looked at.
Control Panel
FTP Connections Metar NOAA
[Tab] Webfiles Upload Times and Av/Ext
See Extra Options
-
That's how it is. Thank you very much for pointing it out to me. Greetings
-
I finally managed to fix this report and put some order in the root directory of my web hosting, however, there are two reports that have stopped working for me, I understand that the path is not well indicated in the script.
The first https://www.meteosanjuan.com/wxnoaaclimatereports.php (https://www.meteosanjuan.com/wxnoaaclimatereports.php) I have modified without success
$NOAAdir = isset($SITE['NOAAdir'])?$SITE['NOAAdir']:'./dailyreports/';
$NOAACurDir = isset($SITE['NOAACurDir'])?$SITE['NOAACurDir']:'./dailyreports/';
In the second in the annual reports https://www.meteosanjuan.com/wxtempdetail.php (https://www.meteosanjuan.com/wxtempdetail.php) I can't find where I should change the route.
The idea is that the root of the server is not so loaded with files, which when trying to search for a specific one is an expensive mission, since the website has been running since 2010
Can anybody help me?
-
For your second query try the wxreport-settings.php lines 29-30
For the first try include-NOAA-reports.php lines 71-72
-
Well, thank you very much, by changing the path as indicated and copying the dailynoareport folder to the folder, I have been able to fix the second one, that is, the one with the monthly report.
However, the first one resists me, even having indicated the path in the lines of the include-NOAA-reports.php script as you indicate.
https://www.meteosanjuan.com/wxnoaaclimatereports.php (https://www.meteosanjuan.com/wxnoaaclimatereports.php)
It generates the following error:
Warning: File (./dailynoaareport52024.htm): Failed to open stream: No such file or directory in /home/meteosan/www/include-NOAA-reports.php on line 364
And I don't understand it because this file is located in the path indicated in the script:
$NOAAdir = isset($SITE['NOAAdir'])?$SITE['NOAAdir']:'./dailyreports/';
$NOAACurDir = isset($SITE['NOAACurDir'])?$SITE['NOAACurDir']:'./dailyreports/';
Any ideas?
Thank you
-
Try '../dailyreports/'; ie two . Instead of one
-
Well no, there is no way, it is as if this instruction does not exist, keep looking at the root
$NOAAdir = isset($SITE['NOAAdir'])?$SITE['NOAAdir']:'../dailyreports/';
$NOAACurDir = isset($SITE['NOAACurDir'])?$SITE['NOAACurDir']:'../dailyreports/';
Let's see if Ken comes by and enlightens me
Thanks for your help
-
check line 47 in the settings-weather.php and revert ../dailyreports/ to ./ in the include
-
Yes sir, this is the line of code that contains the path of the dailynoaareports file. Those contained in the include in my case are not decisive. Now it works correctly.
check line 47 in the settings-weather.php and revert ../dailyreports/ to ./ in the include
Thank you very much and sincerely for your invaluable help. And although there is room for improvement, I still have some graphics and report files to relocate, the root of the server is much cleaner.
Greetings