Viewing 1 to 10 of 12 items
Tag Archives: php

Get WP CLI to use MAMP’s version of PHP

I just set up WP CLI and it wasn’t working because I had MAMP installed. This advice fixed the issue at hand: [http://stackoverflow.com/questions/4145667/how-to-override-the-path-of-php-to-use-the-mamp-path/10653443#10653443] In your home folder /Users/David for exmaple, you can create a .bash_profile. In here you can export variables and then add them to your path. Open up the file to edit it  Full Article…

0

PHP date() Function

Taken from: http://www.w3schools.com/php/func_date_date.asp The date() function formats a local time/date. Syntax date(format,timestamp) The timestamp is optional, format options are listed below: Specifies how to format the result: d – The day of the month (from 01 to 31) D – A textual representation of a day (three letters) j – The day of the month without  Full Article…

0

PHP Browser and Platform detection scripts

This is a php mobile browser detect script: http://code.google.com/p/php-mobile-detect/ This is a php browser and platform detect script: http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/   

0

monitor your website/webserver using PHP

As taken from this website: http://www.catswhocode.com/blog/how-to-easily-monitor-your-web-server-using-php In order to make sure that your website is always available to the public, you have to monitor it. In this tutorial, I’ll show you how you can easily create a monitoring script that will check your website availability and send an email or sms alert to you if it  Full Article…

0

Fix the Vanilla Forum PDO issue on Localhost

Taken from the Vanilla forum. A question that usually would appear would be about an error relating to PDO shows up when you visit your freshly uploaded Vanilla 2.0.15 folder. It’s obviously not a bug but I don’t know where else to post this, but I originally had the question of “why am I getting  Full Article…

0

PHP Operators

This section lists the different operators used in PHP. Arithmetic Operators Operator Description Example Result + Addition x=2 x+2 4 – Subtraction x=2 5-x 3 * Multiplication x=4 x*5 20 / Division 15/5 5/2 3 2.5 % Modulus (division remainder) 5%2 10%8 10%2 1 2 0 ++ Increment x=5 x++ x=6 — Decrement x=5 x–  Full Article…

0