Saturday, 31 October 2015

Read All Files From Directory

If we want to read all files name or specific files name from directory , no need of worry php provide B.I.F(built in function) name as glob().

What this method do?
glob search path name with provide patterns and fetch all related files.

glob('dirname'/*.*');
above method will fetch all files with any extensions we can also fetch particular extensions using below syntax
glob('*.ext');

Friday, 30 October 2015

Define Keyword Means


Define as name its clear that to declare some thing what is that thing its an variable? no its work as a constant once a define keyword use with any word it will never change or overwrite in php

define Syntax is 
define('word','value');
data type contains (Boolean,Integers,Float& Strings).

Example:


<?php
//print my constant
define('mycontnt','php-guides');

echo mycontnt;
//print output php-guides


?>