by prettyscripts on 2010-07-30 11:37:13 • Leave a comment »
php • framework • yii
i'm currently reviewing / learning yii, another php framework. while following the guide to configure gii, i wasn't able to access gii. 403 error was displayed. it's because by default gii only allow access via localhost. if you're like me having a sep…
more »Tags: framework, gii, php, yii
by prettyscripts on 2010-05-17 10:42:06 • Leave a comment »
php • symfony
to download file the symfony way, add a download action and not to display layout unless there are errors.
in /path/to/your/app/modules/your_module/actions/actions.class.php:
public function executeDownload(sfWebRequest $request) {
$file = Do…
more »Tags: download, php, symfony
by prettyscripts on 2010-02-19 11:19:00 • Leave a comment »
php
there are a few ways to calculate how many days between 2 given dates. the following examples calculates how many days to x'mas from today (19/2/10).method 1 using gregoriantojd($month, $day, $year) function to find out the julian day count. withou…
more »Tags: date, day, php
by prettyscripts on 2010-02-11 10:36:45 • Leave a comment »
php
sometimes the following notice is displayed when accessing array:PHP Notice: Undefined offset [number] in /path/to/your/file.php on line [number] or this:PHP Notice: Undefined index [number] in /path/to/your/file.php on line [number] this means t…
more »Tags: notice, php, undefined
by prettyscripts on 2009-11-02 12:14:38 • 2 comments »
php • symfony
when working on symfony project it's common to run symfony doctrine:build-all (update - in V1.4 symfony doctrine:build --all) constantly. but after the command is run, the collation / encoding is changed to something that wasn’t used when the database wa…
more »Tags: collation, database, doctrine, encoding, php, symfony