PHP Archive

  • Hide php errors on production copy

    Hide php errors on production copy

    If you are certain your solution is thoroughly tested and ready for production deployment add this line of code to the top your code: <?php error_reporting(0); ?> In the event you are using a framework (such as Zend), place this at the top of your index.php parser.

    Read More

  • Format date with zend framework – PHP date format

    Format date with zend framework – PHP date format

    Today I found a handy class within in the Zend library to format date in whichever style you require: $myDate = new Zend_Date(strtotime('2010-07-13')); $myDate-&gt;toString("dd.MM.YYYY"); Perfect.. parse done Note though the formatting of the string is a little different to that of the PHP date class ones, here are the Zend ones: <?php /** * Returns [...]

    Read More