Questions tagged as 'php'

3
answers

Abort AJAX request

I have a question. I need to cancel an AJAX request on the client side and on the server side. On the client side I use abort() var requisicao = $.ajax({ url : 'xyz.php' }); if(requisicao && cliente_abortou_requisicao){...
asked by 07.11.2016 / 19:05
1
answer

Count number of PDF pages with JavaScript

I am generating a PDF file with reports generated through PHP. In the PDF file, an x number of reports is generated and each report has a number of pages. I need to know if this number y is even or odd, if it's odd I need to add a blank page....
asked by 25.08.2016 / 14:34
1
answer

Does PHP work with cache?

I'm noticing that my application is experiencing some error, or else my browser is always caching, even though I'm performing the cleanup. I have a .php file and contain the loadEvent function, which is responsible for doing sel...
asked by 21.11.2016 / 11:30
1
answer

How do I know when to use each of the execution functions?

How each of the PHP functions works: pcntl_exec('/caminho/executar'); exec('/caminho/executar'); shell_exec('/caminho/executar'); Is there any uniqueness among the 3 examples mentioned above? Although it is clea...
asked by 03.12.2015 / 18:13
2
answers

functions and methods in PHP are case-insensitive?

Some time ago, due to an accident at the time of a debug I realized that PHP is not case sensitive at the time of a function call. Example: print_r($teste); print_R($teste); Print_R($teste); The same thing happens for the methods of...
asked by 11.02.2015 / 15:24
3
answers

Why in so many ways check if a value is NULL? How to standardize?

There are certain things that still do not come into my head in relation to PHP. Because there is the is_null function, when we can simply compare the values through a comparison operator. Such as $variable === NULL ? And why...
asked by 24.02.2015 / 13:14
2
answers

What is faster, access data in file or database?

In performance, which method is faster to recover data, 1) read a file (which will be generated only once with PHP) or 2) get this data from a database? This data will always be displayed on the page in question. So far I'm using a .json...
asked by 29.12.2014 / 18:39
3
answers

How do you join data from another table

How to merge data from another table. On the downstairs bank I have 3 tables: dados: id, nome, end, tel... etc.... cidades: id, nome_cidade status: id, nome_status $sql = "SELECT * FROM dados "; $resultado = mysql_query($sql) or di...
asked by 26.01.2015 / 02:21
3
answers

Convert date of type 2016-10-04 15:51:16 to, 04-10-2016 15:51:16 in SQL or PHP how to do?

I am doing a job to show the date and time of the insertion in the script in the database, I have to show the date in dd-mm-yyyy format and then the time, how can I do this by the SELECT of the script or by the PHP? If so, how can someone help m...
asked by 10.10.2016 / 16:58
3
answers

What does it mean - in PHP?

I'm studying a little php to use in a work and I came across a snippet of code on the internet where it is used "->" in the code and I could not find any page that dealt with this element of code. return $stmt->execute();     
asked by 05.10.2015 / 23:39