Author Topic: PHP vs. HTML  (Read 2878 times)

TechnoMonkey

  • Strong Breeze
  • ***
  • Posts: 127
    • EW9323
    • KTXARANS6
    • TechnoMonkeys Weather
  • Station Details: La Crosse WS-2315 / High Sierra Server / Mac Mini 2.3 GHz Intel Core i5/ 8GB Ram / OS 120GB SSD / Home Folder 500GB FireWire / DATA 8TB RAID 5 / 1TB TIME CAPSULE
PHP vs. HTML
« on: October 12, 2014, 04:45:41 PM »
For you gurus out there. HELP!

This is my file:

    <tr>
      <td style="vertical-align: top;">DWINDD&#36;<br>
      </td>
      <td style="vertical-align: top;">Replaced with current wind direction dial.<br>
      </td>
      <td style="vertical-align: top;">DWINDD&#36;<br>
      </td>
      <td style="vertical-align: top;"><img src="WCFILES/DWINDD$" alt="">
      </td>
    </tr>

If I name it *.php, this is the result:

    <tr>
      <td style="vertical-align: top;">DWINDD&#36;<br>
      </td>
      <td style="vertical-align: top;">Replaced with current wind direction dial.<br>
      </td>
      <td style="vertical-align: top;">DWINDD&#36;<br>
      </td>
      <td style="vertical-align: top;"><img src="WCFILES/winddirection.jpg" alt="">
      </td>
    </tr>

If I name the file *.html, I get this:

    <tr>
      <td style="vertical-align: top;">DWINDD&#36;<br>
      </td>
      <td style="vertical-align: top;">Replaced with current wind direction dial.<br>
      </td>
      <td style="vertical-align: top;">DWINDD&#36;<br>
      </td>
      <td style="vertical-align: top;"><img src="WCFILES/<img src="winddirection.jpg" alt="Wind direction gauge"/>" alt="">
      </td>
    </tr>

Any ideas on how I can fix this?

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Images are expected to be in HTML directory. (Re: PHP vs. HTML)
« Reply #1 on: October 12, 2014, 09:59:00 PM »
Dear TechnoMonkey and WeatherCat web spinners,

I just checked my own website and indeed it is expected that you will allow WeatherCat to generate the <img .  .> tag and that the images are supposed to be in the same directory as the HTML.  I don't think there is a way to put them into a subdirectory.  If you want to ask Stu about it you'll have to wait until he gets back from his holiday on Tuesday.

Cheers, Edouard

WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: PHP vs. HTML
« Reply #2 on: October 13, 2014, 05:21:31 PM »
Correct, the tags will expect the images to be in the same directory as the page.