Questions tagged as 'php'

2
answers

Validate xml file before updating database

I have a file upload system that when sending the xml file it sends the inserts and updates to the database, but if I send a file with the different structure I get errors. I have already found some solutions using DTD and # How can I ensu...
asked by 11.03.2015 / 03:43
1
answer

Problem with Regular Expression

preg_match('<[ \w"=]+name="xhpc_composerid"[ \w="]+>',$exec,$result1); echo $result1[0]; //input type="hidden" autocomplete="off" name="xhpc_composerid" value="u_0_1k" preg_match('/value="[\w]+"/i',$result1[0],$result2); echo $result2[0];...
asked by 13.03.2015 / 02:46
2
answers

Simple log editing with PHP + MySQL

Basically the three scripts should edit a record in the Database: records.php: <?php // Aqui você se conecta ao banco $mysqli = new mysqli('127.0.0.1', 'root', '', 'login'); // Executa uma consulta $sql = "SELECT 'user_i...
asked by 26.02.2015 / 20:40
1
answer

"ob_gzhandler" on the same server not always supported

On the same hosting server, some accounts support ob_gzhandler and send the page with compression for the browser: /* Sending gz-encoded data to web browsers * that support compressed web pages */ ob_start("ob_gzhandler"); But ot...
asked by 24.02.2015 / 19:12
1
answer

Foreach PHP JSON json_decode How to print sub array

Good morning everyone! My question is as follows. I created a foreach to access the data below an API $token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; $headers = array('Authorization: Token ' . $token); $ch_subs = curl_init(); curl_setopt($ch_subs...
asked by 07.09.2018 / 12:14
1
answer

Is there any Java function equivalent to var_dump ()?

Does anyone know if there is any Java function equivalent to var_dump() ?     
asked by 26.05.2015 / 01:57
0
answers

How to generate Banco do Brasil tickets with PHP registration? [closed]

I have a health plan management system that, among other things, has a sales module where new customers are registered and the system generates 12 tickets for the one-year contract. These tickets are generated using a class called OpenBoleto. Th...
asked by 12.07.2017 / 16:27
1
answer

cURL - PHP; How to do a looping in code?

I need at the end of the code to delete the downloaded files and download again, to keep repeating this every 4 min. Every 4 min he runs this "download, delete and download again" script. Home How to make?! Thank you from the heart to whom to he...
asked by 28.07.2017 / 13:23
3
answers

What is the purpose of {} in the code below? and what is the definition?

$objeto->{'getEndereco' . ucfirst($tipo)}()->getCep();     
asked by 04.07.2017 / 14:59
1
answer

How to call another PHP page within a PHP page

Galera, I have a PHP page and now I need to call another PHP page by passing the parameters I have collected from my DB. How can I do this? I've tried this, but it was not! $qry_str = "id=".$id_mensagem; $ch = curl_init(); // Se...
asked by 26.06.2017 / 15:35