Questions tagged as 'codeigniter'

1
answer

Calculate the number of hours between two hours and transform into float

I needed to create a function that received two hours in the format (00:00:00), calculates the number of hours between them, and converts me to float. However the float would be of this genre: Resultado: 2 horas e 30 min -> 2,30 Resultad...
asked by 13.05.2016 / 19:16
1
answer

How to restrict user access in Codeigniter

I have a system that I need to restrict access in some areas such as User Administration, for example. I'm not sure how to get the user logged in. I know I need to restrict access to the file and hide the menu. <?php $this->load...
asked by 26.04.2016 / 20:10
2
answers

PHP / Codeigniter - How to convert image to byte array? [closed]

I want to leave here registered 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)); }     
asked by 24.06.2015 / 16:35
1
answer

How to save data passed by parameter in the url in a session?

This is the following, I was asked to do this: Make the user to pass in the url the image and the desired color (to change the image and color according to the client), the moment you receive this color and image, I must record in session (sessi...
asked by 19.03.2015 / 14:38
1
answer

Select with Join, in Codeigniter

I'm having a doubt on a select with the use of join in codeigniter, it follows: I have 2 tables. tabela jogo id | id_time1 | id_time2 99 | 1 | 2 tabela time id | time 1 | Real 2 | Barcelona I want to return teams to set up a...
asked by 22.01.2016 / 02:35
2
answers

How to query with where and like between two tables?

I have the following problem: I have two tables, the following tables: tabela mensagens +----+-------------------+-------+---------------------+ | id | mensagem | _de | hora | +----+-------------------+-------+----...
asked by 05.12.2015 / 00:50
2
answers

Error when requesting Ajax

When I try to make a request ajax using the command $.post of jQuery, an error appears in the netWork of the chrome someone knows what that error might be Code:Iamusingthecodeigniterframework$.post('/pages/entradaprodutos/carregar_no...
asked by 20.02.2014 / 15:32
1
answer

Local codeigniter Ok but on server 404

Hello everyone, I'm having a problem opening my CI project on the server I use; My Settings If I use / Welcome, for example the CI finds the page normally, but if I use any of my controllers it returns 404; $config['base_url'] = 'http://...
asked by 27.07.2015 / 20:40
2
answers

How do I pass an id through the url using CodeIgniter?

I need to pass the id of a product through the url using the GET method, in codeIgniter what would be the solution?     
asked by 11.10.2018 / 16:50
1
answer

How to pass variable between views?

My problem is this. The dashboard of my project has an input where the user enters the process number and clicks to search, as per the code below: <form class="navbar-form navbar-left" role="search" action="<?= base_url() ?>processo...
asked by 22.05.2018 / 01:05