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

The Archive Base Latest Questions

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

I have a problem with my JSON RPC service. I make a class and

  • 0

I have a problem with my JSON RPC service. I make a class and put it output of application folder(I put it on service folder on root directory). This servis is class which I called by jQuery and use Ajax to response database results.
How do I access to database file which is put in
application/config/database.php
Can you help 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-14T05:08:48+00:00Added an answer on June 14, 2026 at 5:08 am

    Load the database if it’s not loaded already:

    $this->load->database();
    

    then call the configuration items:

    $db['default']['hostname'];
    $db['default']['username'];
    //etc
    

    Update

    If you are looking to get these variables outside of the codeigniter application, define BASEPATH and include the file:

    define('BASEPATH','');
    include('/full/path/to/codeigniter/application/config/database.php');
    

    then you can call the configuration items as shown above.

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

Sidebar

Related Questions

I have a problem with deserializing JSON data from an external REST service. Depending
I Have two problem in this Case : I want to pass a JSON
I use Zend Framework and I have problem with JSON and UTF-8. Output \u00c3\u00ad\u00c4\u008d
I have a problem regarding json web service security. I tried to developed a
I have this little problem with json. //real json var json1 = {test1:TEST1,test2:TEST2,test3:TEST3,test4:TEST4}; alert(json.test1);
I want to display place details from this json: I have problem with parse
Json Problem : I have this formatted JSON { Table1:[ { TableName:LoadDistributor, Description:Distributor ,
I have a problem with parsing a JSON result. This is what I get
I have a problem with parsing my JSon Data in an Android application. I
I have a problem when I update an object. This is the model: class

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.