PHP Archives - Page 6 of 6 - Ian Carnaghan

[function.file-put-contents]: failed to open stream: File name too long

Error: : failed to open stream: File name too long To solve this error you need to rename the...

Mar 22 · 15 sec read >

How to suppress PHP error messages

At this piece of code to the top of your PHP script error_reporting(0); It’s always better to try and...

Mar 22 · 5 sec read >

Nusoap – PHP Warning: Attempt to modify property of non-object in nusoap/lib/nusoap.php on line 4603

Open the file lib/nusoap.php and change line 4594 from $this->schemas->imports = true; to $this->schemas->imports = true; Source: http://sourceforge.net/projects/nusoap/forums/forum/193578/topic/4566878

Mar 22 · 9 sec read >

PHP function used to read CSV files

The below function can be used to read CSV files and returning an array with all values obtained from...

Mar 22 · 10 sec read >

How to check if a Request was made via AJAX in PHP

// Check for Ajax Request  if (isset($_SERVER) && strtolower($_SERVER) === 'xmlhttprequest') {     //Do stuff here }

Mar 22 · 4 sec read >

PHP function to get the number of days between two dates

The below function can be used to calculate the difference in days between two dates USAGE: /**  * Getting...

Mar 22 · 12 sec read >

How to get the last character in a string using PHP

This can be done by using the substr which will return a part of a string. The sample code below will...

Mar 22 · 10 sec read >