Questions tagged as 'php'

1
answer

How to join query string in Laravel 4 pagination?

How do I join query string in pagination of laravel 4? For example: I have a data listing and on this same screen I have a search filter. When I send a get to request the filter in the list by url http://localhost/lista-de-produtos?marca=...
asked by 01.12.2015 / 14:40
4
answers

convert json to php object

UPDATE I found this answer from SOen , at the link suggested by @Pedrox, talks about reflection , would it apply to this case too? As I've already been told here in the SOpt , I was trying to convert a list of objects to json. Well,...
asked by 11.11.2015 / 14:33
3
answers

How to treat the logged-in user in an MVC system?

I'm creating a MVC framework a couple of weeks (developing it and using it at the same time), I got to the part of creating the authentication system. So I would like to create a way for me to configure which routes the user can access when...
asked by 14.11.2015 / 15:40
1
answer

PHPMailler Error sending SMTP email connect () failed. UOL HOST

Hello, I have a problem regarding the connection with Uol's SMTP, I'm trying to send email without any success. // Inicia a classe PHPMailer $mail = new PHPMailer(); // Define os dados do servidor e tipo de conexão // =-=-=-=-=-=-...
asked by 17.11.2015 / 03:14
1
answer

Where is the path of the images of posts in Wordpress stored?

I'm putting together a custom cakephp plugin, because the plugin of the wordpress itself does not work, until then, I was able to use everything from the wordpress posts table, the problem is that I do not know where the path of the images of th...
asked by 17.11.2015 / 17:20
1
answer

How can I list all directories using FTP?

I've tried ftp_nlist () and ftp_rawlist () but return is always an empty array. The question of Access / Authentication is ok, will only try to read a list if the same already connected to a user: Example: $dados = array('host' =>...
asked by 04.02.2016 / 19:50
1
answer

Use include or constants to get codes?

I created a file containing patterns that are used on my system. I would like to know what is the difference in performance between calling the code by a include or a constante like this: //código do incluir.php: <a href=""&...
asked by 09.02.2016 / 18:15
2
answers

Foreach with PHP StdClass

My page shows posts that have been registered to the database. Some posts have files that have been uploaded. These files are saved in server folders and the database has the table "Pivot_files" with columns ID, Post, Name and Size. $postagens...
asked by 23.11.2016 / 08:34
1
answer

Add Wordpress user in more than one role

I'm developing a plugin for members area in WordPress and I'm going to control this access through the roles functions. Assuming I create the functions: content1, content2, and content3. How would I be able to assign more than one role to a...
asked by 23.11.2016 / 19:12
1
answer

How to assign function to an Array of Objects?

I have this php function returning this String: function retornaGeoCod(){ for($i = 0; $i < 2; $i++){ echo '{ "lat":"-19.4746845", "long":"-44.159503", "local":"Prudente de Morais"},'; }...
asked by 30.11.2016 / 11:14