Questions tagged as 'php7'

1
answer

dompdf incompatibility with php7

Greetings! I was working with PHP Version 5.4.3 and with DOMPDF (to print the pdf form in pdf format); When I upgrade to PHP Version 7.2.1 I get the following error:    Fatal error: Uncaught DOMPDF_Exception: No block-level parent found. N...
asked by 29.01.2018 / 16:21
1
answer

Recognize images from a url - Regular Expressions

I have a function in which recognizes the url <?php function findReplaceURL($text){ $reg_exUrl = "/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/"; if(preg_match($reg_exUrl, $text, $url)) { return preg_replace($reg_...
asked by 10.11.2018 / 03:46
3
answers

PHP Unexpected value when comparing floating values

I already saw the problem of floating comparisons with integers and decimals. Here is explained in the red box: link To solve this we have the library: BCMath arbitrary precision math : link And supposedly the function would come from...
asked by 28.09.2018 / 10:31
2
answers

Find the matches of a string in an Array

I have this code where I define an array and then there is a String, I want to find the matches for each possible value of the array, in this example I would have to return 2 matches in the string $ searchname but the print_r that I do returns a...
asked by 30.08.2018 / 14:47
1
answer

Error loading a text file into mysql, using array with php.

I try to load a txt, with coding format utf8 and with separators between lines Þ and between fields ¶ . I upload it with a form html e input type = file . I have the files sorted by mvc. And the version of php...
asked by 28.02.2018 / 01:51
2
answers

How to add several ports to the same Docker container?

I am running a docker container running an apache2.4 + PHP7 + MSSQL service the issue is that I want that same container to add port for ssh and ftp, as I would do if I already declared it for the first time the 8080: 80?     
asked by 01.02.2018 / 18:46
2
answers

Remove special characters to a string in PHP?

How about? Veran I have a little problem with some strings that are full of a unicode character. My string is this: $variable = "c\u0000o\u0000d\u0000e"; Which has this unicode character: \ u0000 I would like to know how I can remove all...
asked by 09.04.2018 / 07:05
1
answer

How to validate a number of characters in a cycle and 'set' a value with PHP?

In php I get two parameters, the codigo and the cantidad , the codigo can be PDO0016890 and the cantidad can be 10000 which are the number of times the increase will be number of codigo ....
asked by 21.11.2018 / 21:33
1
answer

Call to undefined function mysqli_init ()

I am using CodeIgniter with Apache 2.4, I already checked my php.ini file and it does not have commented the line of extension=php_mysqli.dll , and in the same way I check that I have installed the library and I really do not know what the...
asked by 26.10.2018 / 19:34
1
answer

Relay, relay, relay does not turn on when running shell_exec or python exec in php7

Hi, I have this code on the Raspberry pi zero w: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title></title> <link rel="stylesheet" hre...
asked by 15.10.2018 / 06:16