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 8874705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:47:24+00:00 2026-06-14T18:47:24+00:00

What I want to do is creating a file like my_custom_settings.php in config directory

  • 0

What I want to do is creating a file like my_custom_settings.php in config directory and call the defined variable in view part.

let’s say in my_custom_settings.php:

define('TEMPLATE_DIR', 'assets/front');

and in view part direct in HTML:

<link href="<?=TEMPLATE_DIR?>/stylesheet/style.css">

or any other alternative solution??

PS: Now I am using base_url() to access the path

  • 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-14T18:47:26+00:00Added an answer on June 14, 2026 at 6:47 pm

    personally i extend the /core/helpers/url_helper.php , defaults are site_url() , base_url(), current_url(); etc … i just extended that for having base_static_url();

    so put in core/helpers/url_helper.php:

    if ( ! function_exists('base_static_url'))
    {
        function base_static_url()
        {
            $CI =& get_instance();
            return $CI->config->slash_item('base_static_url');
        }
    }
    

    then in config.php file you just add 1 more line:

    $config['base_url'] = "http://mysite.com/";
    $config['base_static_url'] = "http://mysite.com/static/"; //path to your static resources folder
    

    then you can call static resources using :

    <img src="<?php echo base_static_url();?>img/myimage.png"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating file(images) upload form. I want to add input elements by clicking on
in my xml file elements are not constant like say my file is <alpha>
Criteria, don't want creating copies of objects all over the place. Should be fast,
I have some conditional formatting styles. I don't want to keep creating new rules
Im creating a game an want to be able to add there score so
Im creating a Windows Service and I want to put a dynamic path in
I am creating a site and want to have individual pages for each row
I'm creating a website and I want it also to be prepare for mobile
I am creating a setup project and want to remove the option to install
I want to use Jenkins for creating RPM packages to deploy code and scripts

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.