codeigniter-2

how to set up two codeigniter applications running on same server

杀马特。学长 韩版系。学妹 提交于 2019-12-13 19:33:12
问题 I build a codeigniter app a few months ago - it's a networking tool. Now my client wants me to build a reporting application for them - accesses the same database the networking tool does, but it's not really related. I've downloaded a fresh / newer copy of codeigniter into a new folder under www ... but now I'm wondering this is the right way to architect the solution .. physically. Has anyone else tried building multiple ci applications on the same server? Should I be / Can I combine

cannot find mod_rewrite for codeigniter [closed]

不打扰是莪最后的温柔 提交于 2019-12-13 07:52:22
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . I cannot find the mod_rewrite in the codeigniter wiki anymore? where did it go? I tried looking at this link but its not in here anymore. 回答1: mod_rewrite is part of apache web server it not part of codeigniter

Sidebar sliding issue when a ajax function calls in codeigniter

一个人想着一个人 提交于 2019-12-13 07:27:04
问题 I have an add function in codeigniter controller thats work using ajax. when click on Add Rfq in sidebar .and again trying to click on any other link on the sidebar it automatically closing.why affecting this function in sidebar working? [![sidebar view] Controller Function public function addrfqoffline() { $content = ""; $this->load->helper(array('form', 'url')); $data['customers'] = $this->userdata_model->usersname(); $data['merchants'] = $this->merchant_model->merchantname(); // $data[

PHP: CodeIgniter; Managing two db connections; variable database parameters

本秂侑毒 提交于 2019-12-13 07:01:02
问题 i’m starting to code in CI and i have some problems with the following matter: I need a controller that will return a list of databases from a given server-login-pass and the tables in each database. Reading the user guide i’ve found everything i need, but still i have trouble managing to make this work. I believe i cant rely on the database.php config (multiple groups) since my controler has to accept any given server-login-pass. Going straight to the point, i’ve tried this basic code and

CodeIgniter + Smarty = Error

谁说我不能喝 提交于 2019-12-13 06:19:23
问题 Here's what I did: Downloaded and unzipped CI Downloaded and unzipped Smarty in /application/libraries/Smarty-3.1.4 Saved https://github.com/kzhiwei/codeigniter-smarty/blob/master/application/libraries/Smartylib.php to /application/libraries/Smartylib.php (also fixed line 2 to point to the correct folder) Added Smartylib in autoload libraries Created a test.tpl and called it from the controller: $this->Smartylib->display('test.tpl'); Now, I'm getting the following error: Fatal error: Call to

CodeIngiter: Load a view inside of another view

让人想犯罪 __ 提交于 2019-12-13 06:12:55
问题 I'm using CodeIgniter. I want to load views inside of other views. How can I do this? Example: Let's say I have a "view" called "CommentWall". In CommentWall, I want a bunch of "Comment" views. I use the view for "comment" all over my site! How can I do this? It seems CodeIgniter only allows me to load views sequentially, which is sort of strange considering I use reusable views INSIDE of other views! Can I do a $this->load->view('comment'); inside of my view for CommentWall? Or is there some

Export pdf document with php using dompdf

試著忘記壹切 提交于 2019-12-13 05:17:21
问题 I have a question for you, so I tried to export pdf document with php using dompdf,all goes well but when I send php variables to display it's add to the end and the beginning .%27 public function generateTitlePage($number_cadastral='') { $this->load->library('dompdf_gen'); $dompdf = new DOMPDF(); $html = <<<HTML <html> <head> <meta charset="UTF-8"> <link rel="stylesheet" type="text/css" media="screen" href="TitlePage.css" /> </head> <body> <div style="margin-top: 100px; text-align: right;

Codeigniter load custom upload config

笑着哭i 提交于 2019-12-13 04:55:01
问题 I have a small problem. I have a custom configuration file for uploading. I want to load the settings without redefining them. Okay, my configuration look like this: config.php $config['upload_path'] = 'tmp/'; $config['allowed_types'] = 'zip'; $config['file_name'] = ''; $config['max_size'] = ''; $config['encrypt_name'] = false; $config['remove_spaces'] = true; Controller // Here is my problem $config[] // How to load settings from config.php without again defining $config array $config[

Pass data from library to controller and then to view in CodeIgniter 2

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 04:40:19
问题 I'm trying to pass some data from my custom library to the controller and make it available in my view. For the life of me, I can't see where I'm going wrong. I was going to get database results; for testing I've resorted to a simple array but it's still not working. The library: class Test{ public function __construct(){ $this->CI =& get_instance(); } public function getStuff(){ $test = array('one','two','three'); return $test; } } The controller: function __construct(){ parent::__construct(

CI 2.0.3 session heisenbug: session is lost after some time 20 minutes, only on server redirect, nothing suspicious in the logs

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 04:19:38
问题 I can't seem to make any progress with this one. My CI session settings are these: $config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 0; $config['sess_expire_on_close'] = FALSE; $config['sess_encrypt_cookie'] = FALSE; $config['sess_use_database'] = TRUE; $config['sess_table_name'] = 'ci_sessions'; $config['sess_match_ip'] = FALSE; $config['sess_match_useragent'] = FALSE; $config['sess_time_to_update'] = 7200; $config['cookie_prefix'] = ""; $config['cookie_domain'] = "";