Jump to content

Smarty Question


Alex341

Recommended Posts

I'm in the last stages of integrating WHMCS :) However Iam having an issue with PHP include. Heres the existing code: (And yes the div is closed elsewhere ;))

 

<div id="header-image" style="background: url('<?php include('./banner.php'); ?>');">

 

Ive tried many things to get this sorted, various combinations ect but nothing seems to work.

 

Any help appreciated.

Link to comment
Share on other sites

Ive tried that, no joy Im afraid. Ive also tried {php_include } and {literal} {/literal}

 

Its a rotating banner on a PHP array, hence the background.

 

Your path is more than likely incorrect if its not working. Turn on display errors on that page by adding ?display_errors=on to the url of the page your on

 

It should then show you the php and/or smarty errors.

Link to comment
Share on other sites

If the header information is correct, calling it directly as bear said should work. Unless the banner.php output already puts the <img> tags in. Going to a random image script I have directly shows me the image source as its a php file, and my browser has no idea it's an image.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated