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 Add the below content in your model page. For more details : HTML Purifier…
This is the custom PHP by this one’s can get date range from two different dates in PHP. Example : Function call Just pass the two different dates and the date format which you want the output.In the above call we are calling getDatesFromRange defined above and we want the…
PHP Pushwoosh notification using Pushwoosh API Pushwoosh is real time cross-platfrom service to send push notification on android and IOS mobile application. To send and push notification fro PHP pannel we need push auth and push application id that we will get from https://www.pushwoosh.com/ and by using those credentials we…
The following query display the count number of rows added last hours MySQL. Function used : DATE_SUB(), NOW()
In YII2 there are many function including built-in helper for building urls. So we can easily build the url to image by path too . To display the image in grid view : To display the image in DetailView :
There are two YII2 templates available: Basic YII2 Application Template – a basic frontend application template. Advanced YII2 Application Template – consist of common, frontend, backend and console Below are the the steps for an easy installation of yii2-advanced template using composer To install YII2 advanced template using composer in…
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…
What are the possibles ways to solve this Dining Philosophers Problem? Question: Consider the following two scenarios in the dining philosophers problem: First a philosopher has to enter a room with the table that restricts the number of philosophers to four. There is no restriction on the number of philosophers…
PHPExcel extension is used to experting and importing Excel data 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…
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…