Questions tagged as 'php'

4
answers

MySQLi vs PDO - Which is the most recommended to use?

With mysql_* entering the deprecated state, the PHP documentation recommends using the PDO and MySQLi. Which do you recommend for use? PDO seems to be more suitable for working with object-oriented only than at the same time I saw...
asked by 06.03.2014 / 18:10
1
answer

How to multiply uploaded files with Ajax?

I'm trying to upload multiple files using ajax and I came across the following problem, at first when I uploaded with just one file it would return me in php the array $_FILES with the name of my file, so I could move to my temp folder....
asked by 25.01.2016 / 18:39
1
answer

How to keep the url fixed?

I'm using mod_rewrite to rewrite the url, but I'd like to leave it fixed, eg: www.meusite.com.br/index.html www.meusite.com.br/produtos.html www.meusite.com.br/contato.html Ficar apenas: www.meusite.com.br How can I do this?     
asked by 18.01.2016 / 20:02
2
answers

I can not create class in php and use connection with PDO

I am creating a class that looks for database data to be displayed. For example, one of the functions of the class is to pick the date, from a die, in the bank and display it on the screen. The way I'm doing, it's not working. Follow my code...
asked by 29.10.2015 / 03:29
1
answer

Integration between PHP and R

I am developing a project with php and I decided to use R for statistical calculations. But I'm not sure how to do this integration. If there is a "design pattern" for situations like this.     
asked by 29.10.2015 / 13:10
2
answers

PHP Ordering

I have a PHP code that pulls an XML and plays on the screen however I would like it to run in random order and not the order that is in XML. Is this possible? Code that I'm using. PHP $xml = simplexml_load_file('produtos.xml'); foreac...
asked by 02.10.2015 / 16:06
1
answer

PHP + Google Geocode API

Follow the method code: function GetGeoCode($address) { $geo= array(); $geocode = file_get_html('http://maps.google.com/maps/api/geocode/json?address=' . $address . '&sensor=false'); $output = json_decode($geocode); echo '...
asked by 01.11.2015 / 06:34
2
answers

PHP Matrix how to fill

I want to fill this matrix. It works, but when I try to put more than one result on a single line, only the last one appears. How to correct? <h1>Mapa</h1> <?php $linha=0; $coluna=0; //preencher o mapa //debug($planeta); $m...
asked by 10.08.2015 / 02:17
1
answer

Table does not appear in return Json

I'm trying to show a table on the return of my insert but I'm not getting it, the insert operation is correct as well as the confirmation message, but the table is not displayed, I have this: function GravaFase(event) { event.p...
asked by 04.08.2015 / 18:11
1
answer

What is the best method to do login authentication in android and webservice php RESTFul?

I'm building an application that needs login, I've already created the webservice in php using Slim. I'm currently using a POST, passing a json with email and password to the webservice to return the corresponding user's json, but I believe t...
asked by 06.09.2015 / 19:12