Questions tagged [PHP] (40486)

1
answer

How to compare array with database?

Hello, actually you need to compare the array of textarea: $pieces = explode(PHP_EOL, $_POST['links']); and that comes from a database, the database has only: id, name Here is how I tried to implement it: $pieces = explode(PHP_EOL, $_POST['links']); foreach ($pieces as $value) { $result = $connect->query("SELECT * FR...
connie_Corw asked April 4th 20 at 14:22
1
answer

How to pass parameters from one CURL to another in php?

There are two script with CURL in php. In the first script I receive the data in POST. It looks like this: $url = $_POST['link_for_parse']; $idauto = basename($url); $domain = parse_url($url, PHP_URL_HOST); if ($domain == 'www.site.com') { $googleApiUrl = 'http://site.com/parse/parse.php'; $ch = curl_init(); curl_setop...
Susie.Macejkov asked April 4th 20 at 14:22
1
answer

How to find the right class $str = curl_exec($curl)?

$base = $page; $curl = curl_init(); curl_setopt($curl, THIS, FALSE); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_URL, $base); curl_setopt($curl, CURLOPT_REFERER, $base); curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE); $str = curl_exec($cur...
euna68 asked April 4th 20 at 14:21
1
answer

How to dynamically add table rows?

Can't understand how to dynamically output the page data in the form of rows or simply rows. When pressing the save button, come data entered into a form via AJAX, and should be displayed under the table. Code script.js $( document ).ready(function() { $("#save").click( function(){ sendAjaxForm('result_form', 'ajax_form',...
Haylee.Konopelski43 asked April 4th 20 at 14:21
3
answers

Why assign to a variable the result of readdir()?

Actually, the question is: Why must the assignment of the result variable of a function readdir() in the conditions? $d = opendir($path); if( ($f = readdir($d)) !== false ) { //code } closedir($d); Why not trigger correctly: $d = opendir($path); if( readdir($d) !== false ) { //code } closedir($d);
hillary asked April 4th 20 at 14:20
4
answers

What are the ways to run a php script in console mode on the http request?

We have a php script to import a large XML file. The file is imported in about 2 hours. Now we run the script manually from the console. Now you need to run this import on a specific event from a normal script. What are the ways to run a PHP script in console mode, from a normal script and not wait for its execution ? ...
maymie.Watsica47 asked April 4th 20 at 14:20
1
answer

As Preobrazovatel the date from the database in php mysq?

Hello everyone, himself not a programmer but worthwhile task. Suppose there is a database test the database has a table time at table time values 1611823382 We need to display the time in human understanding well, my cocoa code <thead> the <tr> <td>date</td> </tr&g...
clay_Nader asked April 4th 20 at 14:19
1
answer

As between the figures to bridge the gaps between them if the signs?

Tell me how between to bridge the gaps, examples test 10, 0 test ==> test 10,0 test test 10 , 0 test ==> test 10,0 test test 10. 0 test ==> test 10.0 test test 10 .0 test ==> test 10.0 test test 10 . 0 test ==> test 10.0 test test 10, test ==> test 10, test test 10. test ==> test 10. test If there is a...
Orpha asked April 4th 20 at 14:19
4
answers

The problem with JSON in PHP?

Hi all. There's a problem with json php $a = array( array('City' => $city, 'Street'=> $street)); // type string $arrayAdressJson = json_encode($a); // convert to json pianolist data in database [{"u0413u043eu0440u043eu0434":"dfdfdfdf","u0423u043bu0438u0446u0430":"dfdfdf"}] if 1 then everything is OK, but if they a...
jacinto.Keebler asked April 4th 20 at 14:19
1
answer

How to create a pid file in php?

Tell me how to create a pid file in php launch background process the process starts $cmd = '/var/www/html/Utility/Pid -source test file download.json id 1'; $output = shell_exec($cmd); programmatically I can look through exec('ps aux', $output); But processes may be running several.
Margot19 asked April 4th 20 at 14:19