Bonjour,
Quel est le meilleur moyen d'inclure ce graphique dans une page en php
J'ai essayé un iframe, mais le graphique n'est régénéré.
<IFRAME src="http://www.boock.ch/meteo/Statistics/graph_heat_degre.php" width="820" height="420" scrolling="no" frameborder="0"> </iframe>
Bonne journée
Comparer 2 années
- paaubert
- Membre
- Messages : 2624
- Inscription : dim. janv. 17, 2010 7:16 pm
- Localisation : 1555 Villarzel - Switzerland
- Contact :
Re: Comparer 2 années
_________________________________________________________________________________________________________
Station Vantage Pro2+ avec station agricole - Weatherlink 6.0.3 - GraphWeather 3.0.15b - Cumulus 1.9.4 - Windows W10 ultimate x64
http://www.boock.ch/meteo-villarzel.php

Station Vantage Pro2+ avec station agricole - Weatherlink 6.0.3 - GraphWeather 3.0.15b - Cumulus 1.9.4 - Windows W10 ultimate x64
http://www.boock.ch/meteo-villarzel.php

Re: Comparer 2 années
Bonjour,
Pour inclure le graphique dans une page php:
Moi, je fais un tableau et:
<tr>
<td rowspan='2' style="vertical-align: top;"><? include "graph-pluie.php" ?>
</td>
</tr>
(attention au nom du fichier .png généré)
En général même dans un fichier php, je repasse en html car je m'embrouille dans les "".
J'ai aussi trouvé un moyen d'ajouter ces graphiques dans la page statistiques si cela t'intéresse.
J.
Pour inclure le graphique dans une page php:
Moi, je fais un tableau et:
<tr>
<td rowspan='2' style="vertical-align: top;"><? include "graph-pluie.php" ?>
</td>
</tr>
(attention au nom du fichier .png généré)
En général même dans un fichier php, je repasse en html car je m'embrouille dans les "".
J'ai aussi trouvé un moyen d'ajouter ces graphiques dans la page statistiques si cela t'intéresse.
J.
- paaubert
- Membre
- Messages : 2624
- Inscription : dim. janv. 17, 2010 7:16 pm
- Localisation : 1555 Villarzel - Switzerland
- Contact :
Re: Comparer 2 années
Merci Julien, mais il me semble que l'include ne fonctionne pas si le fichier n'est pas dans le même répertoire ?
<tr>
<td rowspan='2' style="vertical-align: top;"><? include "Statistics/graph-pluie.php" ?>
</td>
</tr>
<tr>
<td rowspan='2' style="vertical-align: top;"><? include "Statistics/graph-pluie.php" ?>
</td>
</tr>
_________________________________________________________________________________________________________
Station Vantage Pro2+ avec station agricole - Weatherlink 6.0.3 - GraphWeather 3.0.15b - Cumulus 1.9.4 - Windows W10 ultimate x64
http://www.boock.ch/meteo-villarzel.php

Station Vantage Pro2+ avec station agricole - Weatherlink 6.0.3 - GraphWeather 3.0.15b - Cumulus 1.9.4 - Windows W10 ultimate x64
http://www.boock.ch/meteo-villarzel.php

Re: Comparer 2 années
Pas remarqué, mais il faut mettre ../ autant de fois qu'il est nécessaire pour remonter au bon niveau.mais il me semble que l'include ne fonctionne pas si le fichier n'est pas dans le même répertoire ?
En fait, je n'ai peut être jamais eu le problème!
Si cela ne marche pas, il y a require_once.
J.