Yii Framework Archives - Ian Carnaghan

How to create a back link using the Yii Framework

In the view that you wish to use add the following code for the back link. CHtml::link('Back',Yii::app()->request->urlReferrer);

Mar 22 · 5 sec read >

Getting error: Bad Request The CSRF token could not be verified: when CSRF has been enabled in the Yii Framework

Getting error: Bad Request The CSRF token could not be verified: when CSRF has been enabled in the Yii Framework...

Mar 22 · 16 sec read >

How to create a Email link using the Yii Framework

In the view that you wish to use add the following code for the Email link. CHtml::mailto($data->email) NOTE: $data->email contains the...

Mar 22 · 9 sec read >

How to include JQuery in the Yii Framework

You can add the below code anywhere in your Yii Application and JQuery will be included in the rightful place in your application...

Mar 22 · 6 sec read >

How to disable JQuery in the Yii Framework 1.1.x

Include the following code anywhere in your application    <span id="urn:enhancement-f9965c67-8856-e15b-a96a-9ae613690f5b" class="textannotation">Yii</span>::<span id="urn:enhancement-0ff1ff82-84ee-005a-2d01-4a27dedfa994" class="textannotation">app</span>()->clientScript->scriptMap=array(           'jquery.js'=>false, );

Mar 22 · 14 sec read >

How to get the server name using the Yii Framework 1.1.x

Use the code below to obtain the server name Yii::app()->request->serverName

Mar 22 · 3 sec read >

How to get the user’s IP Address using the Yii Framework 1.1.x

The Host Address server variable forms part of the Server and execution environment information set To get the user’s IP ADDRESS within the Yii Framework use the following code...

Mar 22 · 10 sec read >

How to get the QUERY STRING using the Yii Framework 1.1.x

The QUERY STRING server variable forms part of the Server and execution environment information set To get the QUERY STRING within the Yii Framework use the following code echo...

Mar 22 · 11 sec read >

How to get the request URI using the Yii Framework 1.1.x

The Request URI server variable forms part of the Server and execution environment information set To get the URI within the Yii Framework use the following code echo Yii::app()->request->getRequestUri();...

Mar 22 · 11 sec read >