Questions tagged as 'php'

2
answers

How to detect if PHP is running on command line or server?

Sometimes, when I run some PHP script, I need to know if it is running on the command line or not, because if it is running on the command line, I can perform a different action. Is there any way to detect if the script is running on the comm...
asked by 19.01.2017 / 11:42
2
answers

What is the difference between "memory_get_usage" and "memory_get_peak_usage"?

What is the difference between the functions memory_get_usage and memory_get_peak_usage ? Do the two do the same or are there any differences between them?     
asked by 18.01.2017 / 18:54
2
answers

How to make a request with curl

Hello everyone, I'm involved in a project and I need to make a request with curl to get data from an api. But I've never used curl in php that way. Can you help me? curl -X GET https://jsonodds.com/api/odds/nfl -H "JsonOdds-API-Key: yourap...
asked by 14.03.2017 / 17:49
1
answer

How does an automatic categorization algorithm work?

I have this doubt. I've noticed on sites like Yahoo Answers that there is a recognition of the semantics of the questions and they are categorized automatically. Of course, there are bugs, but it is very effective most of the time. Which m...
asked by 21.03.2017 / 16:39
2
answers

PHP multiply time by an integer value?

How do I multiply hours in PHP ? Example: $time = "0:01:00"; $mult = "5"; echo $time*$mult; Return was zero, because it did not return 00:05:00 ?     
asked by 31.07.2017 / 20:40
1
answer

Configure error log

I'm working with PHP and I'm on the support side, but I do not know the error system well. Is there any material I can read to help me? My biggest problem is the following, many errors are written to the log this way: PHP Fatal error: requ...
asked by 05.06.2017 / 21:35
1
answer

SIGEP WSDL problem

I'm a time with a project of the post office, I had to make a connection with the webservice SIGEP WEB, I found something already in development in, was using the same and everything OK, from one day to the other the same stopped working , I mad...
asked by 21.01.2016 / 19:47
1
answer

View in real time all PHP scripts running via SSH

I have some scripts that do a data mining job, and in some cases need to run long processes that can consume a lot of CPU. I need to discover a command via SSH to monitor all running PHP scripts. Something like: watch ps -F -C php-cgi ......
asked by 18.01.2016 / 04:18
2
answers

How to paint a cell according to the value of a select?

I'm needing help formatting a <td> according to the result of select PHP. I thought about using jQuery but I do not know much about it. <tr class=""> <td class=""><?php echo ($row['Id_acordo']); ?><...
asked by 16.12.2015 / 14:58
1
answer

Array Results Comparison ()

I have an Array () of results, I need to buy if the city of array 0 is equal to the city of array 1, if the city of array 1 is equal to the city of array 2 ... and so on. p> The print_r of my SQL resulted in this: Array ( [0] => Array...
asked by 02.09.2015 / 15:48