This post will explain you that how to include social META tags for defining exact titles, description and images for better results. Why should I Use Facebook Open Graph Meta Tags? There is no secret that facebook is […]
How to Create,Get,Check Sessions in Zend Framework 2?
In GF2 in order to use Sessions we should use this use ZendSessionContainer; class. This class Container extends of ArrayObject and instantiates with ARRAY_AS_PROPS flag that means you can easily iterate through properties […]
Yii Tutorial :: How to Add Facebook Open Graph Tags ?
This Blog post is about Adding Facebook Open Graph Tags to the web app in Yii, This is really simple Task, Using This Tags We can tell Facebook What Content Should share like Image, Title, Description .. etc. Syntax
1 |
Yii::app()->clientScript->registerMetaTag("TagValue", null, null, array('property' => "og:TagName")); |
How to install Alternative PHP Cache(APC) in Xampp Windows?
Find The suitable APC for the Xampp from the blow given link based on PHP Extension Build, and Xampp version. http://dev.freshsite.pl/php-accelerators/apc.html Steps to Follow Install the Apc: 1) Extract Zip file and extract […]
How to count days between two dates in PHP?
In this tutorial, we will write about calculating the number of days between two dates. This can be done very easily using the DateTime object that is available since PHP 5.3. if you need to count number of days between […]
How to Create Laravel Eloquent model without a primary key ?
This post about Creating Laravel Eloquent model without a primary key,By default laravel will take primary key as ID, we can override this by protected $primaryKey = ‘something’;, but in order to turn of this […]
How to add Date Picker to a Form Text Field in YII?
Here is simple code snippet for adding date picker in YII. We have a Date Picker widget in Yii so I am gonna show you how to use this widget with simple blow code sample.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<?php echo $form->labelEx($model,'deadline'); $this->widget('zii.widgets.jui.CJuiDatePicker', array( 'model'=>$model, 'attribute'=>'deadline', 'value'=>$model->deadline, //additional javascript options for the date picker plugin 'options'=>array( 'dateFormat'=>'yy-mm-dd', 'showAnim'=>'fold', 'debug'=>true, 'datepickerOptions'=>array('changeMonth'=>true, 'changeYear'=>true), ), 'htmlOptions'=>array('style'=>'height:20px;'), )); echo $form->error($model,'deadline'); ?> |
How to redirect to previous URL in YII
If you want to get previous URL use blow line of code
1 |
echo Yii::app()->request->urlReferrer; |
1 |
$this->redirect(Yii::app()->request->urlReferrer); |
AJAX + CSRF Protection in Codeigniter ?
Codeigniter 2.0 adds an important security feature to prevent CSRF (Cross Site Request Forgery) attacks. Even better, the feature is automatically added to your forms(if you enable CSRF in Config, and if you use CI form […]
How to Check for Ajax request in CodeIgniter?
The CodeIgniter Input Class Provides some helper functions to deal with user inputs , this class is initialized automatically by the system so there is no need to do it manually. I always recommend you to use this class […]