in reply to Howto Include Image with HTML::Template

your path needs to be set relative to the root directory of your webserver.

i.e. if your webpage is served out public_html you should just use: /SPACE-Web2/test.png
  • Comment on Re: Howto Include Image with HTML::Template

Replies are listed 'Best First'.
Re^2: Howto Include Image with HTML::Template
by monkfan (Curate) on Apr 03, 2007 at 05:57 UTC
    Hi,
    I forgot to mentioned that my Perl script with HTML::Template is stored under:
    /home/monkfan/public_html/SPACE-Web2/cgi-bin
    And the figure is stored under:
    /home/monkfan/public_html/SPACE-Web2
    Even though I've modified that script to have this:
    $template->param( FIG => "../test.png" );
    It still doesn't show the figure.

    Regards,
    Edward
      have you tried making it relative to your root web directory?
      also, perhaps check the file permissions on the directory and image.
      $template->param( FIG => "/SPACE-Web2/test.png" );

      if it doesn't work , then use full URL such like

      http://www.domain.com/test.png