Jump to content

How to link dynamic src paths (of scripts and images)


Recommended Posts

Hi, for a fixed image or script I was using this code:

<script src="<?php echo $config->urls->templates?>styles/assets/plugins/jquery-1.10.2.js"></script>


Then I decided to put a dynamic link in the template, i.e. variable from page to page, and I used this code:

<script src="<?=$page->url_bg?>"></script>

or:

<img style="padding-left: 15px;" src="<?=$page->box_url_img_SX?>" alt="<?=$page->box_img_alt1?>">

But they don't work. Where do I go wrong?

Link to comment
Share on other sites

No, when I open I just get this message... which I couldn't solve

Note: your current server locale setting isn’t working as expected with the UTF-8 charset and may cause minor issues. Your current locale setting is “C”. Please add this to your /site/config.php file (adjust “en_US.UTF-8” as needed): setlocale(LC_ALL,'en_US.UTF-8');

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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