Thursday 13 October 2011

How to find text recursively in file using linux commad?

Folks,

Please use the following command:

find <folderpath> -type f | xargs grep -l "131848637983654"

Here "131848637983654" has to find in <folderpath>

Cheers!

Monday 3 October 2011

How to use symfony inbuild functions in non-symfony class in lib folder?

Dear,

$sfUser = sfContext::getInstance()->getUser();
$sfRequest = sfContext::getInstance()->getRequest();
$sfController = sfContext::getInstance()->getController();

$sfUser->setAttribute('abc','yes');
$sfRequest->setMethod();
$sfController->redirct('cart/list');


Cheers!