codeigniter

passing objects from the global scope to a model

烂漫一生 提交于 2020-01-06 19:28:02
问题 Here's the code of my model in codeigniter. <?php $catalogo = (object) array ( "name" => "catalogo", "url" => "url_catalogo" ); $categorias = (object)array ( "name" => "categorias", "titulo" => "varchar_titulo", ); $novedades = (object)array ( "name" => "novedades", "titulo" => "varchar_titulo", "fecha" => "fecha_publicacion", "descripcion" => "text_descripcion", "categoria" => "fk_categoria" ); $img_nov =(object) array ( "name" => "imagenes_novedades", "url" => "url_img", "novedad" => "fk

Using mpdf with codeigniter generate blank output

谁说胖子不能爱 提交于 2020-01-06 19:17:27
问题 I have been flowing this post to generate a pdf but the output is blank and there is no error displayed , i have put : public function generate_pdf() { $this->load->library('mpdf'); $mpdf=new mPDF('utf-8','A4'); $mpdf->WriteHTML('<p>HTML content goes here...</p>'); $mpdf->Output(); } When i put : public function generate_pdf() { $this->load->library('mpdf'); $mpdf=new mPDF('utf-8','A4'); $mpdf->debug = true; $mpdf->WriteHTML('<p>HTML content goes here...</p>'); $mpdf->Output(); } referred to

add limit to data passed to bootstrap modal with foreach() in codeigniter

拜拜、爱过 提交于 2020-01-06 18:34:48
问题 I'm not experiencing any difficulty with pulling data from a db table in CodeIgniter and displaying it in a bootstrap modal window. Using this button link; <a href='#' class='btn btn-success btn-sm' data-toggle='modal' data-target='#myModal'>View</a> I'm able to access the modal window no problem and display the results of this following coding; <!-- alert view --> <div class='modal fade' id='myModal' role='dialog'> <div class='modal-dialog'> <!-- Modal content--> <div class='modal-content'>

set cookie in jquery dialog and show selected value on page after submit with postcode

余生长醉 提交于 2020-01-06 18:11:42
问题 i'm making a page where people have to fill in their postcode so they can search factories in a near area. i used the jquery modal dialog where people have to enter their postcode and click submit. then i want a cookie to be set so when the user enters the site for a second time, the postcode is still set. so he can search for factories directly. i have this popup: the people have to fill in their postcode there and then click opslaan (save) Here you can see the mainpage with the search

set cookie in jquery dialog and show selected value on page after submit with postcode

给你一囗甜甜゛ 提交于 2020-01-06 18:11:28
问题 i'm making a page where people have to fill in their postcode so they can search factories in a near area. i used the jquery modal dialog where people have to enter their postcode and click submit. then i want a cookie to be set so when the user enters the site for a second time, the postcode is still set. so he can search for factories directly. i have this popup: the people have to fill in their postcode there and then click opslaan (save) Here you can see the mainpage with the search

Mod_rewrite and URL redirection - APACHE,Mod_rewrite,PHP,Codeigniter

拈花ヽ惹草 提交于 2020-01-06 17:48:07
问题 I have got a very specific problem. I am using wamp server to run my codeigniter projects locally. I have loaded mod_rewrite in and it is showing in my phpinfo. In my wamp root directory, I have a codeigniter project folder "mysite".Here is the directory structure of mysite. -mysite |--images |--eshots |--useruploads |--temp |--SpryAssets |--css |--js |--timthumb After enabling this mod_rewrite, I modified my "host" file in my windows directory and added this line of code in my virtual host

Mod_rewrite and URL redirection - APACHE,Mod_rewrite,PHP,Codeigniter

你。 提交于 2020-01-06 17:46:27
问题 I have got a very specific problem. I am using wamp server to run my codeigniter projects locally. I have loaded mod_rewrite in and it is showing in my phpinfo. In my wamp root directory, I have a codeigniter project folder "mysite".Here is the directory structure of mysite. -mysite |--images |--eshots |--useruploads |--temp |--SpryAssets |--css |--js |--timthumb After enabling this mod_rewrite, I modified my "host" file in my windows directory and added this line of code in my virtual host

Query error in code igniter ( wrong escape )

半腔热情 提交于 2020-01-06 16:21:32
问题 I try to insert a row in the table on code igniter from a Array, but something is going wrong. That's the array: Array ( [Date] => 2001-08-15 [Number] => 962883 [Time] => 17:40 [Etc1] => 0 [Etc2] => 0 ) And this the insert: $this->db->insert('mytable', $myarray); A new line is inserted, but all columns are empty! Trying to find de error, I printed the last query by echo $this->db->last_query() ." <br>"; And I got: INSERT INTO `mytable` (`Date`, `Number`, `Time`, `Etc1`, `Etc2`) VALUES ('\02

Jquery Mobile - including fragments for a multipage template?

北城余情 提交于 2020-01-06 15:52:10
问题 We're doing a Codeigniter/jQM web application and have been debating the multipage template vs. single-page/file. Most of the cons of the multi-page template (meaning multiple data-role=page divs in a single file) cited relate to the single file getting unwieldy from a maintenance (and possible load time) perspective. The cons of the single-page approach seem to mostly focus on potential latency between pages. Given the vagaries of the internet, the latter approach seems more risky. It is my

Inserting into a Table joined to another Table by a reference table?

筅森魡賤 提交于 2020-01-06 15:33:11
问题 I came up with this database design after discussing it with many people over IRC. In my project, a User aka Member can have many "Teams" & "Projects" on his account and can be part of some "Projects" as well. Moreover, "Teams" can have many "Members" as well including the Member who is creating it. Now my question is, suppose, a Member wants to create a Project or a Team under his account (later on I want to see all projects created by a specific member), can I do a insert into the using