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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:20:14+00:00 2026-05-31T07:20:14+00:00

I like base_url() so much that I want to create another global function base_img_url()

  • 0

I like base_url() so much that I want to create another global function base_img_url() where I can define the url in the config.php file just like base_url(). How do I do this and where should the function be? Is this a common practice?

Right now I’m just defining a constant in constants.php.

  • 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-05-31T07:20:16+00:00Added an answer on May 31, 2026 at 7:20 am

    Your are going right.

    I am also doing the same, defining in constants.php file.

    I do not think any other way, as you are expecting is possible.
    Defining in constants file, is the best and easiest plus non-problematic way.

    What can be wrong doing like this ?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an html that look like this: <ul> <li> <img src=<?php echo base_url();?>assets/images/blue_background.png
I have a url like this: index.php/home/lista_modelo_ajax?id=+$('#colecoes').val(), The thing is that the: $('#colecoes').val() is
In Kohana 3 bootstrap.php one can define base_url : Kohana::init(array( 'base_url' => '/foo/', ));
I can't disable the query strings in my links! Please help. $this->load->library('pagination'); $config['base_url'] =
Imagine that I have a Spring MVC controller something like this: @Controller @RequestMapping(/base-url) public
I have an ajax request that looks like this, $(#frmProducts).submit(function(){ var dataSet = $(#frmProducts).serialize();
Is there a builtin function to get url like this: ../images.html given a base
I have form like this: <form method=POST action=<?php echo base_url() ?>admin/admin_search> <fieldset> <label for=nalozi>Nalozi</label><input
how can i parse an url in c++ with boost regex like i have
I would like to base one component's x and y cooridnates according to another,

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.