Welcome Guest, Not a member yet? Register   Sign In
how to make new helper ?
#1

[eluser]Mario "St.Peter" Valentino[/eluser]
hello all
i want to make new helper to generate data.
how can i make a new helper ?
any body here can explain me and give me an example tutorial



Thanks

Mario "St.Peter Valentino"
#2

[eluser]InsiteFX[/eluser]
./application/helpers/assets_helper.php
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Assets Helper
*
*/

if ( ! function_exists('asset_url'))
{  
    function asset_url()
    {
        // the helper function doesn't have access to $this, so we need to get a reference to the
        // CodeIgniter instance.  We'll store that reference as $CI and use it instead of $this
        $CI =& get_instance();
      
        // return the asset_url
        return base_url() . $CI->config->item('asset_path');
    }
}

/* ------------------------------------------------------------------------
* End of file assets_helper.php
* Location: ./application/helpers/assets_helper.php
* ------------------------------------------------------------------------
*/




Theme © iAndrew 2016 - Forum software by © MyBB