I need to set set_time_limit(0); in my PHP script but I get Warning: set_time_limit() has been disabled for security reasons I already tried increasing max_execution_time property in my php.ini with no effect. I’m running WAMP 2.4 with Apache 2.4.4 and PHP 5.4.12. EDIT: I’m running it on my localh…
Tag: php
How to format an UTC date to use the Z (Zulu) zone designator in php?
I need to display and handle UTC dates in the following format: 2013-06-28T22:15:00Z As this format is part of the ISO8601 standard I have no trouble creating DateTime objects from strings like …
How do I truncate a decimal in PHP?
I know of the PHP function floor() but that doesn’t work how I want it to in negative numbers. This is how floor works This is what I WANT Is there a PHP function that will return -1234? I know I could do this but I’m hoping for a single built-in function Answer Yes intval
getting value of with $_POST gives text
So, I’m retrieving these options from a database and I need to retrieve the value but I’m getting the text in between the tags by doing this therefore if I print $inst I get the “IUTIRLA” for the first option but I need the 41 I don’t know what I’m doing wrong… this i…
Get previous attribute value in Eloquent model event
Is there a way to see the old/previous value of a model’s attribute in its saving or updating event? eg. Is something like the following possible: Answer Ok, I found this quite by chance, as it’s not in the documentation at present… There is a getOriginal() method available which returns an …
onclick not loading iframe
Here is the JS I am using This is in the head of the document. I have made a sidebar containing links: I have a target frame as: It works when I click the top level link, Sales in my case, the relevant document gets displayed in the target frame, but as soon I navigate to submenu links, its get
Download a file with an ajax call
I am using PHPExcel to read an excel template, populate the data, and ask the user to download the file. generate_excel.php When I open generate_excel.php directly from the browser, the result file is downloaded. But if I make an ajax call to the generate_excel.php, I don’t get the download prompt. Usin…
Difference between buffered and unbuffered queries
I was always under the impression the difference, in simple terms, between PHP/MySQL buffered and unbuffered queries is that buffered (the default) loads all the data into your results set variable and then you can start using them whereas unbuffered loads a row at a time. Say you ran SELECT * FROM sometable …
Does Google App Engine (GAE) locally develop environment included the Memcached service?
Does the Google App Engine local development environment include the Memcached service? Must I connect the living Memcached service over the Internet even if I debug my PHP service in a local …
How to format a PHP date in .Net DataContractJsonSerializer format?
There is a requirement to send a date inside a JSON post using PHP in this following format /Date(410256000000-0800)/ How do I convert a standard dd-mm-yyyy h:i:s datetime like 01-01-2013 12:00:…