Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7827599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:57:11+00:00 2026-06-02T09:57:11+00:00

I wants to use codeigniter and smarty together.i.e. I wants to use html files

  • 0

I wants to use codeigniter and smarty together.i.e. I wants to use html files instead of .tpl.php files of codeigniter as of smarty. Is this possible or how can I do this.I have searched a lot and find some examples but none of some works as required by me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T09:57:13+00:00Added an answer on June 2, 2026 at 9:57 am

    You should create a library Smarty_tpl.php:

    <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
    //smarty class
    require BASEPATH . "../../smarty/libs/Smarty.class.php";
    
    class Smarty_tpl extends Smarty {
    
    function __construct(){
        parent::__construct();
    
        $smarty_dir = BASEPATH . "../../smarty/libs/";
    
        $this->setTemplateDir(APPPATH."views/templates");
        $this->setCompileDir(APPPATH."views/templates_c");
        $this->setCacheDir(APPPATH."views/cache");
        $this->setConfigDir(APPPATH."views/config");
        $this->setPluginsDir(array("$smarty_dir/plugins","$smarty_dir/sysplugins/"));
        $this->compile_check=   true;
        $this->force_compile=   true;
        $this->caching=         true;
        $this->cache_lifetime=  86400;
    }
    }
    

    And its using:

    $this->load->library("Smarty_tpl");
    $this->smarty_tpl->display("...");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't have any idea how to use this class in .net. Anyone wants
i use a simple PHP framework (like Codeigniter) without ORM. I have a database
Sorry if this is a simple question, is it possible to load codeigniter without
I have a dropdown labeled amenities[] and it's an array. When I use CodeIgniter's
I have a CodeIgniter project. I want to use Memcache, but I don't want
How can push a URI like this in CodeIgniter (1.7.1 currently): example.com/seg1/seg2/seg3/seg4/ or example.com/seg1/seg2/
I have got a little problem using the CodeIgniter route function. I use the
I'm making use of codeIgniter to upload files into folders in the server. Now
I am fairly new and just started to use Codeigniter, and have come across
I use codeigniter. I want multiple upload image, for this work, i use library

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.