Questions tagged as 'php'

1
answer

Remote file cache with interval updates with PHP

I'm developing a news portal and I'm using a Weather API . The problem is that every time people open the page, PHP downloads the API JSON , and this interferes with page loading speed. In order to solve this problem and save bandwidth, I t...
asked by 16.01.2016 / 18:55
2
answers

Search field inside select box how to do?

I would like to know if there is any way to put a search field inside a select box, for example ... I have a selectbox with +3000 thousand items registered, there arises my need to have a search field to streamline the user side. In the...
asked by 16.09.2015 / 06:35
1
answer

Difficulty updating data with angular and php

Good afternoon I'm trying to update data in the database and I can not. If I use mysqli, the following warning appears on the console: " link 500 (Internal Server Error)" If I use connection with mysql and PDO, nothing happens, no warning...
asked by 09.01.2016 / 18:44
1
answer

How to automatically include a file, which is not a class, in the composer?

In composer, usually when we set up autoload for files containing classes, I usually do this: "autoload" : { "psr-4" : { "WallaceMaxters\Timer\" : 'src/timer'} } Composer will automatically load the file that has the same class name as...
asked by 15.01.2016 / 16:11
1
answer

How can I make a select in PHP with FIREBIRD PDO?

I've already made a correct connection to Firebird using PHP, however I'd like to know how I can do select in a certain bank. Can anyone help me please? <?php $user = "SYSDBA"; $pass = "masterkey"; try{ $lokos=new PDO("firebird:loca...
asked by 01.07.2015 / 20:19
2
answers

generate query dynamically with union

$sql = 'SELECT COUNT(*) FROM '; $cola = ' UNION '; // Deixar os espaços em branco "em volta". $colaWhere = ' WHERE '; $first = true; $wheres = ""; foreach($arrayNomeBDs as $nomeBD){ $where = ' status = 2'. ' AND nomePessoa="O aqui vai var...
asked by 01.07.2015 / 18:33
1
answer

PHP Mailer sending e-mail without the information

Folks, I made a landing page on the company page and it sends the information that people fill to my email using PHPMailer. Most emails are coming straight, with all the necessary information. However, some emails are coming empty, as if the var...
asked by 14.04.2016 / 13:30
1
answer

How to compare array with string?

The array $buscaMov[9] , contains the word "Internal", but the if only returns me false, in this case it will always stop at else . It should register in the table of purchases, but only register in sales. if ($buscaMov[9] =...
asked by 19.11.2015 / 18:19
1
answer

How to set default size of a PHP image

I would like to know if there is any way to set the height, and the default width in php, I saw some forms, but I used an external class, I wonder if there is any way to use the GD library ... $dest = imagecreatefromjpeg('imgs/bg.jpg'); $tam...
asked by 16.11.2015 / 00:42
1
answer

Why is the style sheet not loading?

I'm trying to use urls amigáveis but I'm having some problems in the learning process. The problem now is that the page does not return the page styles. Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f Rewri...
asked by 15.11.2015 / 15:27