PHP Archive

Configure WampServer 3.0.0 Virtual Host on windows 10 64 bit

I spent some time to configure WampServer 3.0.0. Local host was working fine but setting new project was an issue. To resolve this problem we need to setup virtual host. I figure out and sharing here. I am using following version wamp version 3.0.0 Apache is 2.4.17 PHP: 5.6.16 MySQL: 5.7.9 Windows 10 64 bit

Git essential commands

Git essential commands In this article we will explore git and some important commands to use Git.  As you know Git is used for version control. There are some commands that are used by developers on daily basis while committing.  Here are some useful Git commands. Make  Changes Initializing a git repository. (To create a

Introduction of Web and PHP & Mysql part 1

Introduction of Web and PHP & Mysql In this series of articles we will look into basics of world wide web (commonly know as WWW) and then Php & Mysql. We will work on real world examples and APIs. So let us start. Before diving into world of web development we need to know some

Pagination example in Php Yii Framework

Pagination example in Php Yii Framework While working we need to perform pagination.  Whether to show the list of articles, users or products, we need pagination. In Yii it is very easy to implement pagination. [crayon-5a1177c750b82014892120/]   The above code will get 10 results per page from Database. [crayon-5a1177c750b8e116091424/] You can also find more detail on

Include JavaScript and CSS file in Yii Framework

Include JavaScript and CSS file in Yii Framework While working on a project in YII in beginning I came to know a very nice way of including JavaScript and CSS style files in the Layout / View file  in YII Framework. In YII we use [crayon-5a1177c751770452072742/] and [crayon-5a1177c75177b317517880/] functions. Please see the code below. [crayon-5a1177c751781883212208/]

New features in PHP 5.6

New features in PHP 5.6 There are some very exciting features  in PHP 5.6 release. In this article we will look into new features introduced in PHP 5.6. File Upload Limit: Before PHP 5.6 upload limit was less then 2 GB but in PHP 5.6 uploads over 2GB are supported. Variadic Functions: Varidaic functions are

How to upload a file in php

How to upload a file in php In this tutorial we are going to discuss how we can upload a file or image in PHP. File uploads are an important feature for many web applications.  We use file uploads in many website we use like Facebook, or Gmail, Yahoo, Hotmail or in job sits and 

Yii Framework- Creating hidden field

In Yii framework we can create a hidden field using model and without model as described below 1. Creating hidden field without model. echo CHtml::hiddenField('name' , 'value', array('id' => 'name')); 2. Creating hidden field with model. echo $form->hiddenField($model, 'name');

PHP – Create folder and a file in the folder

I worked on a project in that project we have to create folders and then files in that folders. is_dir is a function that checks whether a directory exists or not.  mkdir creates a driectory, file_put_contents is a function that create file and places   contents in that file. Following the example code. [crayon-5a1177c758133501620376/]    

Generate Date from week, day number and year.

PHP has a function named ‘setISODate’.  This function takes year, week number and day as parameter and returns a date. [crayon-5a1177c758981468095029/]