Monthly Archives: October 2012

Tasneem – meaning of name

Tasneem means a heavenly fountain.

Tasneem is the name of one of the most honorable drinks of the inhabitants of the Paradise. It is poured on them form the heights.

Tasneem is the name of a fountain in Jannahh (Paradise) whose drink is superior to the purest of wines. Its nectar will only be drunk by those nearest to Allah Ta’ala. Literally means “rich and elevated”.

Tasneem is the name of a spring in Paradise as stated in the Glorious Quran Chapter 83 Surah Mutaffefeen verse 27 & 28:
27      With it will be (given) a mixture of Tasneem;
28      A spring from (the waters), whereof drink those Nearest to Allah.

Reff:
http://www.islamweb.net/emainpage/index.php?page=showfatwa&Option=FatwaId&Id=88629
http://wiki.answers.com/Q/What_does_the_name_Tasneem_mean_in_the_Arabic_Quran
http://www.gowister.com/islam-answer-1933.html

Advertisements

Using Zend Log in Codeigniter

If you are developing a complex script then LOG helps you to keep trace the function execution flow and thus helps fixing out bug.

Here is an implementation of using Zend Log in Codeigniter framework:
1. Copy Zend Log Library:
i. Download ZendFramework-1.11 from here: http://framework.zend.com/downloads/latest
ii. Extract it. Inside it there is a “Log” folder inside “library/Zend” directory.
iii. Create a folder inside “application/libraries” of your codeigniter and copy “Log” folder (from ii.) into it.
iv. Copy “Exception.php” and “Log.php” from extracted “library/Zend”  directory to Codeigniter’s “application/libraries/Zend” directory.

2. Create Library:
Create Zend.php inside application/libraries and paste following codes:

if (!defined('BASEPATH')) { exit('No direct script access allowed'); }

class CI_Zend {
	private $writer;
	private $logger;

	public function __construct() {
		ini_set('include_path',ini_get('include_path') . PATH_SEPARATOR . APPPATH . 'libraries');
	}

	public function log_init($logfile) {
		require_once 'Zend/Log.php';
		require_once 'Zend/Log/Writer/Stream.php';

		$this->writer = new Zend_Log_Writer_Stream($logfile);
		$this->logger = new Zend_Log($this->writer);
	}

	public function info_log($msg) {
		$this->logger->log($msg, Zend_Log::INFO);
	}

	public function err_log($msg) {
		$this->logger->log($msg, Zend_Log::ERR);
	}
}

3. Create controller myzend.php:

if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Myzend extends CI_Controller {

    public function __construct() {
	
        parent::__construct();
    }

    public function index() {
	
        $this->load->library('zend');
        $this->zend->log_init('application.log');

       $this->zend->info_log('This is Info message', Zend_Log::INFO);
       $this->zend->err_log('This is Error message', Zend_Log::ERR);
    }
}

Thats it.

Ref:
Log Your PHP Application With Zend_Log (Part 2)
Integrate Zend library in code Igniter