Questions tagged as 'php'

1
answer

Condition in request laravel

I have a request class called PessoaRequest . In this class, I validate my registration form for people. But now, some information to be inserted appears that is not mandatory: the name of the father and the mother. When I have this inf...
asked by 18.04.2016 / 20:43
1
answer

Good practices for a login system Sessions / Cookies

I would like to know some important points when it comes to making a login system: Sessions Cookies Which one is most appropriate for security issues? Which uses less server resources? (case in a large application) Which is the f...
asked by 06.08.2016 / 21:06
2
answers

Show result of a query in html - PHP + CodeIgniter.

Hello, I am trying to make an example in codeIgniter where I want to display data from the database in html forms. This is my query: $id_entidade = $this->session->userdata('id_entidade'); $query = $this->db->query("SELE...
asked by 04.08.2016 / 00:55
1
answer

Class of the pagseguro does not work with CNPJ.

I had a problem making payments using the class provided by pagseguro and cnpj. Every time I tried to make the payment, I gave the following error: HTTP 400 - BAD_REQUEST [THE REQUEST CANNOT BE FULFILLED DUE TO BAD SYNTAX] 11164 - senderCPF in...
asked by 05.06.2015 / 22:19
1
answer

Passing array as parameter does not work

I need to pass an array as a parameter to a function, each array value has the name of an image, and the function should load each of those images as img/foto1 , img/foto2 , etc. But it is not passing the array values, it is simply p...
asked by 06.06.2015 / 17:04
3
answers

How to make webservice run without user interaction?

So, I'm trying to create a webservice in PHP that will do everything through another webservice (for its API). It will check if it has any messages, having, it processes and returns an appropriate message. My question is: How to make this web...
asked by 30.05.2015 / 03:02
2
answers

Browse directory file

I have a directory on the network with thousands of TXT files generated by other software contracted in the company. The file is named with the following logic: (cpf do cliente)(data da insercao)(hora insercao).txt 1234567894120150501142024....
asked by 25.05.2015 / 19:05
1
answer

return JSON with special characters in URL

I'm having a problem with the return of a JSON, I've done a query to fetch some images from the bank, some URLs the users have registered the images with special characters like - > (ç ã) The texts containing these types of characters are r...
asked by 16.07.2016 / 20:36
1
answer

Generate indented XML through PHP

Hello, good morning. I am generating xml with php, but the code is getting everything in a single line, I need it to be indented when it is generated, respecting the hierarchy. I have no idea how to do this Follow the code used <?php...
asked by 11.07.2016 / 16:26
2
answers

Laravel 5 QueryBuilder, results in simplified collection

I'm using the get() method of Laravel's QueryBuilder and would like to know if it's possible to return the id's in a simple one-dimensional array, for example: [35,45] Instead of: [{"id":35},{"id":45}]     
asked by 15.07.2016 / 15:17