Programming


23

Aug 2017

Html purifier YII 1

CHtmlPurifier is wrapper of HTML Purifier.   CHtmlPurifier removes all malicious code (better known as XSS) with a thoroughly audited, secure yet permissive whitelist. It will also make sure the resulting code is standard-compliant. In your model for more details : CHtmlPurifier


26

Aug 2016

Display image in grid view YII2

In Yii 2 there are many function including built-in helper for building urls. So we can easily bulld the url to image by path too . To display the image in grid view : To display the image in DetailView :


02

Aug 2016

Install yii2 advanced template using composer in windows

The minimum requirement for YII2 is that your Web server supports PHP 5.4.0. The installation require following steps: 1: If you don’t have composer, download it from https://getcomposer.org/Composer-Setup.exe and execulete in yout root folder like c:\xampp\php\ 2: Go to your project folder like c:\xampp\htdocs\yourprojectfolder 3. After this run php init command it is just copy files from directory /environments to your project


28

Jul 2016

Regular expression for decimals as well as integers with a range limit

This is an example for regular expression which allow both decimals as well as integers with a range limit of 40-180 Regex Pattern: [4-8][0-9] : Parse Into Range 40 – 89 [4-8][0-9]\d{0,9}(\.\d{1,3}) : Parse Into Range 40.00 – 89.00 9[0-9] : Parse Into Range- 90 – 99 9[0-9]\d{0,9}(\.\d{1,3}) : Parse Into Range- 90.00 – 99.00 with three decimal places 1[0-7][0-9] : Parse Into Range- 100...

Read More


27

Jul 2016

Excel reader in YII2

PHPExcel extension is used to experting and importing Excel to PHP. In this example we are reading Excel data by using this extension and inserting the data in given tables accordingly. PHPExcel extension is used to experting and importing Excel to PHP. In this example we are reading Excel data by using this extension and inserting the data in given tables accordingly. Step 1: Installation...

Read More


12

May 2016

HTML DOM Document Object In JavaScript

The owner of all other objects in your web page is HTML DOM document object. It represents web pages. If you want to access html element you have start accessing with document object. Finding HTML Elements Method Description document.getElementById(id) Find an element by element id document.getElementsByTagName(name) Find elements by tag name document.getElementsByClassName(name) Find elements by class name Changing HTML Elements Method Description element.innerHTML =  new...

Read More


12

May 2016

HTML DOM Methods in JavaScript

These methods are actions you can perform on HTML Elements and the properties are values of HTML Elements that you can set or change. OUTPUT : My First Page



Page 1 of 2812345...1020...Last »