Most voted "codeigniter" questions
Codeigniter is a framework for developing PHP applications.
Learn more…1,026 questions
Sort by count of
-
0
votes2
answers773
viewsPHP / Codeigniter - How to convert image to byte array?
I want to record here my solution to this problem. $data = file_get_contents("/ImagePath/Image.jpg"); $array = array(); foreach(str_split($data) as $char){ array_push($array, ord($char)); }…
-
0
votes1
answer105
viewsTake data from a db in a class in codeigniter
good day, I’m making a shopping cart and in it I have a function to list the products, and return me an array to then I list in my view more I don’t know if it would be the right one to do it in my…
codeigniterasked 9 years, 4 months ago Clayton Eduardo Mergulhão 373 -
0
votes1
answer1070
viewsCodeigniter local Ok but on 404 server
Hello guys I’m having a problem to open my project in CI on the server I use; my config. if I use /Welcome, for example CI finds the page normally, but if I use any of my controllers it returns 404;…
-
0
votes0
answers76
viewsRoutine to validate if date is earlier than today, if changing the field status to full
I need to do a routine to check if the end date of a particular event has passed, that is if the date of the "end" field is lower than today’s date update to the "state" field to "finished". I’m…
-
0
votes2
answers196
viewsUsing data saved in a Session
I modified my question because I was able to solve the problem of the session. But now I have another question. I have this code in Controller to capture the data passed by parameter and save them…
-
0
votes0
answers80
viewsProblem api Rest codeigniter sometimes unanswered
I’m using a Rest api between 2 different applications, posting from one to another an array, but on the server there are times when the other api does not respond. I put to create a log as soon as…
-
0
votes1
answer394
viewsCheck if URL in the correct format
I need to check if the url is in the right format, and if it is not, redirect to the right url. In another Controller already has a code that does what I need, I just need to adapt it to another…
-
0
votes1
answer92
viewsJoin Arrays with php
good guys to making a system and need to return session and database values most wanted it within a single array, using the function array_unshift() he returns me the following Array ( [0] =>…
-
0
votes3
answers86
viewsUsing variables in the Model
Well, I have the following function in my Model : public function get_learning_category_list() { $categorias = $this->db->select('t1.id, t1.title, t1.metadata, t1.meta_title, t1.description,…
-
0
votes2
answers58
viewsE-mail with tamplate codeigniter
Hello community people, I’m an intern at a programming company, and now I’m trying to send an email with tamplate using codeigniter, you could help me, already managed to send the email, the problem…
codeigniterasked 9 years, 1 month ago Aminadabe dos Santos da Silva 117 -
0
votes0
answers16
viewsCouchdb and codeigniter
I have a little problem here, I have a job to do and I need to integrate the codeigniter with couchdb, I found a library on github, I followed the installation tutorial and everything, but still it…
-
0
votes1
answer50
viewshow to connect to couchdb in codeigniter?
someone knows how to connect to Couchdb using codeigniter? We have tried many tutorials, added the necessary libraries, but we did not succeed. Please help us.
-
0
votes1
answer336
viewsHow to work layouts and javascript in php frameworks
I am doing a course on frameworks and would like to know the following. The tool name itself already speaks: PHP framework Question: You mean the organization of html layouts and scripts based on…
-
0
votes1
answer1811
viewsCorrect way to return the number of results using Codeigniter
I wrote 2 possibilities to return the number of results using Codeigniter, follows: public function get_num_indicados($id_usuario) { $query = $this->db->query("SELECT count(id_patrocinador) as…
-
0
votes1
answer319
viewsCreate routes - Codeigniter
Well, I have this route set in my Routes file : $route['novidades-e-estrategias-de-marketing-digital-em-nosso-blog/(.*)/(.*)'] = "blog/post_list/$1"; This is the url :…
-
0
votes1
answer198
viewsUsing the Codeigniter Helper (Download_helper)
Good evening! I’m using the function force_download() to download a file. However, I need to do this same procedure, but with downloading several files at the same time. I implemented a code, the…
-
0
votes1
answer910
viewsLimit jQuery checkbox
I am creating a system where I list images of the bank and below each image has a checkbox, all this within a for to take the images of the bank, wanted a function to be able to limit the amount of…
-
0
votes1
answer410
viewsIdentify selected checkbox
Good guys I have a page (view) that makes a select of the bank and returns me the registered images for the user select a limit of photos determined by the administrator most wanted to count and…
-
0
votes1
answer353
viewsselect option as parameter for codeigniter method
I’m having a problem I can’t seem to solve at all. I have an html form that has a select option to take the selected value when the form is sent and use as parameter for a method, there is some way…
-
0
votes3
answers485
viewsError inserting data into Mysql - Codeigniter
I have the code <?php $chave = $retorno->resposta->cobrancasGeradas->cliente->cobranca->chave; $this->db->insert('boletos', array('id_fatura'=>$id_fatura,…
-
0
votes1
answer117
viewsBlock indexing by robots in controller
I’m making use of Codeigniter 2 to set up a website. The admin area is in the url http://meudominio.com/mod, to access you need to login. To avoid indexing of search engines, I configured the Routes…
-
0
votes1
answer26
viewsReturn of Equal Employee
I have the following code $sql = " SELECT c.*, cl.razaosocial, cl.idCliente FROM chamada as c, cliente as cl WHERE c.idCliente = cl.idCliente"; $consulta = $this->db->query($sql)->result();…
-
0
votes1
answer219
viewsSort by ENUM Mysql value
I have a question and since I did not find anything on the internet I decided to ask you, well, I have a Mysql table and this table contains an ENUM field that can be 'yes' or 'no', I wonder if it…
-
0
votes2
answers274
viewsTitle in url with codeigniter
I searched several places to pass a post title in the url using codeigniter, ex: http://Sirc/filmes/listar/clube-da-luta The only way I could so far was to use the Helper url_title(), but it’s time…
-
0
votes1
answer236
viewsFreight Table - District Listing
I have a table called bairro: I have a table called tabelafrete: I have the following SQL public function getBairroList() { $sql = "SELECT * FROM bairro as b Left join tabelafrete as t on b.idBairro…
-
0
votes2
answers431
viewsCreating a website and back-end with PHP frameworks
I’m creating a website with back-end system. I have always done this process using only a framework like Laravel or Codeigniter, but talking to some people more experienced in this subject,…
-
0
votes1
answer41
viewsList calls with or without idFunctioned
Sirs. I have the following function. $sql = " SELECT c.*, cli.*, cli.razaosocial as nomeCliente, c.idCliente as idClienteChamada FROM chamada as c, cliente as cli WHERE c.idChamada = '".$id."' AND…
-
0
votes1
answer525
viewsFriendly URL Code Igniter does not work
my htaccess inside the application folder is so: RewriteEngine on RewriteCond $1 !^(index.php|images|robots.txt) RewriteRule ^(.*)$ /index.php/$1 [L] Am I putting it in the right folder? Correct…
-
0
votes5
answers3030
viewsCodeigniter -> Message: Trying to get Property of non-object
I’m trying to fix this bug: Severity: Notice Message: Trying to get Property of non-object Filename: contracts/view.php Line Number: 37 CODE: contratos_model.php public function getById($id){…
-
0
votes1
answer341
viewsRun the function once take the Return and use in a codeIgniter loop
Hello I’m having trouble recovering the Return from a model and using it in a loop (foreach), without the function running again several times... How can I take Return and use it several times? Code…
-
0
votes1
answer73
viewsDoubt codeigniter
Opa Galera! I’m starting with php and codeigniter, I have a question: I have two controllers, each with crud functions, but would need the create(form) views to be loaded on a 3rd page together, how…
-
0
votes1
answer1020
viewsCalculate the number of hours between two hours and turn into float
I needed to create a function that received two hours in the format (00:00:00), calculate the number of hours between them, and convert me to float. However the float would be of this genre:…
-
0
votes0
answers548
viewsPopulating Cities/Neighborhoods in jQuery with fields in Array
I have the following JS. <script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.js"></script> <script type="text/javascript"> $(document).ready(function(){…
-
0
votes1
answer47
viewsVarious functions that will do the same thing
I have the following function function about_about(){ $this->render(); } However, I have another 100 pages, which will only have the render(), how can I do a function just to save code and time?…
-
0
votes2
answers715
viewsCodeigniter + Autocomplete Jquery UI does not return list
Good afternoon, everyone, I have a search field where I give "suggestions" of what to type, based on what I have registered in my database. The same was working perfectly, but it stopped working and…
-
0
votes1
answer413
viewsCheck array keys
Next, I have a value saved array in the variable $chaves as the example below: array(2) { [0] => array(1) { ["chave"] => string(1) "1" } [1] => array(1) { ["chave"] => string(1) "3" } }…
-
0
votes1
answer523
viewsGrab parameter from URL
I need a code that when I click on the image, this image will open in a new tab. So far I have managed to make that when I click on my image it opens another tab with the image path in the URL. How…
-
0
votes1
answer158
viewsHow to modify a url sent via get [Codeigniter] form?
Guys I need to modify a url but don’t know how to do it. I have the following url: http://wedding.axitech.com.br/?procuraonde=Palhoça&procuraoque=bolos and need to turn to the url below:…
-
0
votes0
answers408
viewsmPDF horizontal - PHP
I need to generate a report PDF, with the following specifications: $this->load->helper('mpdf'); $html = $this->load->view('relatorio/interessados_relatorio_impressao', $data=NULL,…
-
0
votes1
answer278
viewsValidating form with jQuery and sending to a controller in codeigniter
I want to do a validation with jQuery before sending the data to the server side, I’m using PHP with jQuery and in the form part use it: < ? php echo form_open('empresa/inserir',…
-
0
votes1
answer80
viewsHow do I get expiration time on the recovery link?
I did a function in the fur codeigniter for password recovery and it’s all working, only I wanted it to expire the link has a x time/day. What logic to use in this situation?
codeigniterasked 8 years, 2 months ago Natan Melo 656 -
0
votes1
answer97
viewsHow do I make a variable become an object?
Model: public function gettoken() { $token = $this->db->get('token'); return $token->result(); Controller $this->load->model('Mod_login'); $get = $this->Mode_login->gettoken();…
-
0
votes1
answer238
viewsE-mail PHP+Codeigniter
People, I made several examples, being them of books or the internet and all return the following message when I run the function to send the email: Failed to connect to mailserver at "localhost"…
-
0
votes0
answers251
viewsForm does not send POST
I am developing a data import system for XLS to Mysql. The system is practically ready. I did a test with a file xls 24kb and successfully exported without any error. The problem is that I have been…
-
0
votes2
answers526
viewsUpdate balance with revenue and expense
I have an application, where there is an option to register an ACCOUNT with initial balance equal to zero and two options to register REVENUE and EXPENSES. And when I register an IRS, the balance of…
-
0
votes0
answers40
viewsPermissions of Modules
I have this class but at the time of comparing if there is this permission inside the return of the array, it appears that it has none. The permission is listed within the array. class Permission{…
-
0
votes1
answer708
viewsError redirecting internal pages with codeigniter
Good night. My doubt is the following, I have a menu and in it several options I created a VIEW called Products query and I would like that when clicking on query the same was for this screen,…
-
0
votes0
answers43
viewsButton in pricing-table Codeigniter
I have a code that shows pricing-table in my View. Each one has a javascript button that when you click on it you need to open another view where you have the details of each pricing-table. How can…
-
0
votes1
answer147
viewsDelay in massive processing of ajax Codeigniter
My code imports data from one database to another. To avoid server overload, I am importing 100 out of 100 records into each ajax. I noticed that in the first requisitions, it takes about 40ms,…
-
0
votes1
answer140
viewsError 500 $.post Codeigniter on Server
Good afternoon, everyone, I have a problem all day and can not solve, I have a system and it works on the localhost server perfectly, but on the server some ajax functions can not send the post.…