Welcome Guest, Not a member yet? Register   Sign In
Accessing Image On CSS with Codeigniter
#6

(This post was last modified: 07-09-2016, 03:14 AM by InsiteFX.)

in order to use holder png's you need to load the holder.js javascript file if it is not loaded.

Here is a method to add to a asset_helper.php

PHP Code:
/* ------------------------------------------------------------------------
 *
 * Assumes that all resources are in a asset directory in the root
 * along with index.php and that the base_url is set in the config.php file.
 *
 * USAGE:
 *
 * asset('path/filename.ext')
 *
 * @access    public
 * @param    string
 * @return    string
 */
if ( ! function_exists('asset'))
{
    function 
asset($uri)
    {
        
$_ci =& get_instance();

        return 
$_ci->config->base_url('assets/'.$uri);
    }


if you want you can change the return to add in your catalog path there.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: Accessing Image On CSS with Codeigniter - by InsiteFX - 07-09-2016, 03:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB