INSTALL ZEND FRAMEWORK 2 -WAMP SERVER

The biggest headache while getting started is to install Zend Framework 2.Alter a long time of search I found this video pretty useful.It worked for me.I

Date function

The format of the outputted date string.date_default_timezone_set — Sets the default timezone used by all date/time functions in a script.

Sunday, February 24, 2013

Install Zend Framework 2 -WAMP server


The biggest headache while getting started is to install Zend Framework 2.Alter a long time of search I found this video pretty useful.It worked for me.It uses Skeleton Aplication.Though this video does not demonstrate installation of compressor,which is a simple step, only the thing is that you have to give path of your php.exe(for ex:D:\wamp\bin\php\php5.4.3\php.exe as my WAMP is in D drive) while installing compressor.

Thursday, December 27, 2012

Date function

 The format of the outputted date string.date_default_timezone_set — Sets the default timezone used by all date/time functions in a script.We use this because some time its necessary to store date when some user event occur and we need to store this to particular database and many more
1:  // set the default timezone to use. Available since PHP 5.1  
2:    date_default_timezone_set('UTC');  
3:    
4:  //Set date function according to: IST(Indian Standard Time )  
5:  date_default_timezone_set('Asia/Kolkata');  
6:  $today=date("Ymd"); //date function is used here  
7:    
8:  echo $today; //will prints date in string like structure  
9:         //ex.-20121227 for 27th Dec.2012  
Ex.
 <?php  
 $timezone=date_default_timezone_get();  
 echo $timezone."<br>";  
 print strftime('%c')."<br>";  
 $timezone1=date_default_timezone_set('Asia/Calcutta');  
 echo $timezone1."<br>";  
 print strftime('%c');  
 ?>  
Output
 America/New_York  
 Fri Dec 28 00:25:54 2012  
 1  
 Fri Dec 28 10:55:54 2012