Questions tagged as 'php'

1
answer

Join php arrays by allocating combined values between the two

I have the following arrays: $corretor = array( 'Carlos', 'Andre', 'Rosinei', 'Vinicius', 'Thales' ); $comissao = array( 5, 3, 3, 3, 2 ); How do I merge both, printing the result as follows:    Carlos - 5% | Andr...
asked by 09.05.2016 / 19:36
1
answer

WebSerivce only accepts requests from local server [closed]

I have a Webservice in PHP and I need to use it to integrate two applications. WS returns in JSON the data I need. The problem is that it returns only the data when the request is made from a local server. If I do the request from any web do...
asked by 09.05.2016 / 20:45
1
answer

How to send variable value into class php?

I've been perfecting secure database connection techniques, and got to the script below. <?php class query_sql { protected static $conect; private function __construct() { $mysql_host = ""; $mysql_base = ""; $mysql_user = "";...
asked by 28.09.2016 / 10:44
1
answer

Access url with ajax and get return

I have the following link to access: https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=5&q=brksedu&key={YOUR_API_KEY} When accessed directly it returns an array like this: { "kind": "youtube#searchL...
asked by 26.09.2016 / 00:54
1
answer

What is the difference between "rands" in PHP?

I would like to know what diff rand of mt_rand and mt_srand; And if you have any other rand.     
asked by 27.09.2016 / 03:50
1
answer

How to read XML in live standard? [closed]

I have a real estate system and I have developed my own XML standard for integration with Portals. But the code that I use to read my XML, can not read the Viva Real standard. Here is an example of the Viva Real pattern: <ListingDataF...
asked by 07.04.2016 / 14:19
2
answers

Fatal error: Call to undefined function http_response_code () php 5.2 [duplicate]

I got a script (Java android and php) from a book I'm studying that simply takes a photo sent from android and saves it to a folder on my server. Home The android application ran without any error, but I ended up with an error in the file in...
asked by 05.04.2016 / 14:54
1
answer

PDO - Problem with FetchAll

Good afternoon, my friends, my problem today is this. I have the following query: set @row_number = 0; SELECT @row_number:=@row_number+1 AS row_number,il.* from itemloja il order by il.LojaId As you can see, there are two that depend. I wan...
asked by 07.01.2016 / 20:54
2
answers

Position of DIV relative to another with dynamic content

I have two divs on my page, one class="rodape" and another class="content" . The first is the footer of the page, and adjusts its position relative to bottom of the fixed contents of the page without problems. Ho...
asked by 08.01.2016 / 16:00
1
answer

Model, View and Controller "Multipurpose" - Laravel 5.1

Good morning, I have in my application 10 different tables, but it has the same structure ... id | nome | descricao . For each table I have in laravel the Model , the Controller and the Views of cadastre...
asked by 08.01.2016 / 13:02