Questions tagged as 'php'

2
answers

How to increase the size of the GET request to place parameters larger than 10KB in NGINX and PHP?

I need to make a very large GET request with NGINX and PHP. Is there any configuration in NGINX or PHP that solves this?     
asked by 25.02.2014 / 16:01
1
answer

Send data to upload images through ajax

<script type="text/javascript"> $(function(){ $("#oformulario").submit(function(e){ e.preventDefault(); var nome = $("#nome").val(); var email = $("#email").val(); var obs = $("#obs").val();...
asked by 20.08.2014 / 23:54
3
answers

Practical use of Constant scalar expressions in PHP and other languages

In PHP 5.6 we will have a feature named Constant scalar expressions . The manual provides some examples, but the main focus would be: How to correctly use the feature without undoing an anti-pattern ? Do other languages implemen...
asked by 16.07.2014 / 23:06
1
answer

Object-oriented PHP tunneling

I have two models User and Post . When editing a post , I want to know if the user is the post author (the post has a user_id authorize editing. If I have a method inside the Post class that receives a User...
asked by 29.08.2018 / 17:31
2
answers

Download direct FTP file

How do I download a file directly from FTP without having to temporarily download to the PHP server? Code:<?php//....$fcon=ftp_connect($ftp_host);$conecta=ftp_login($fcon,$ftp_username,$ftp_senha);ftp_pasv($fcon,true);ftp_chdir($fcon,$ftp...
asked by 26.04.2018 / 15:50
1
answer

Problem with include causing unwanted space

I'm creating a page with some includes ( top and footer ) and where I put these includes appears a huge space with a strange code (% code) (the code does not appear on the page, only in the browser element inspector): Look at the im...
asked by 02.08.2018 / 01:26
1
answer

How does "umask" work in PHP and when should we use it?

I was reading umask documentation and came across this:    When PHP is being used as a server module, the umask is restored when each request is finished.       Translating: When PHP is being used in a server module, umask is rest...
asked by 31.08.2018 / 18:30
2
answers

Send checkbox with ajax jquery php

I have the form to send / work perfect with the other fields, but I can not receive the checkbox selections. I need help getting / manipulating in php: HTML: <div class="input-group"> <label for="servicos">NECESSITA EMBALAGE...
asked by 10.05.2016 / 21:33
1
answer

Define array id () php

I have the following array () Array ( [camposdb] => Array ( [51] => Array ( [0] => cpf_cnpj [1] => nome_razaosocial [2] => cod_c...
asked by 08.09.2016 / 03:15
1
answer

Mini Search Engine

I am doing a mini search system for urls that are stored in a .txt file, one per line, my problem is the performance issue because I have 5000 urls stored (only) and it is already slow in the search , on the server side I have: if(isset($_GET[...
asked by 05.08.2016 / 16:12