Category Covered

Time slot between two time in php  

I have two time "time from" to "time to". Now i will show how to get a interval time after certain minutes.  Here Timeslot on 15 minutes gap. $from = $sch['time_from']; $to = $sch['time_to']; $timePlus = ''; $i=1; while($timePlus<=$to){ $interval = $sch['time_slots']; $interval = $interval*$i; echo $timePlus = date('H:i:s', strtotime($from.' + '.$interval.' minutes'))."<br/>"; $i
 
By: Tech writer  |   Total Read: 1644  |   Read more..

Import mysql database on windows command  

You have to follow the step to restore or import database on local windows desktop or laptop.

Step 1: Open your command line from start->write "cmd" on the input text box and press enter.

Step 2: Now locate to your mysql bin directory here my bin located on "D:\wamp\bin\mysql\mysql5.5.20\bin"

Step 3: Process to local. Press "d:" and enter, then write cd and the path lik
 
By: Tech writer  |   Total Read: 882  |   Read more..

Get all dates of the current month in PHP  

Use the following code to get all the dates on the current month   $todate = date('d'); for($i = $todate; $i<=31; $i++){ $allDates[] = date('Y-m').'-'.$i; $dt = strtotime(date('m/'.$i.'/Y')); $day = date("l", $dt).'-'; } print_r($allDates)
 
By: Tech writer  |   Total Read: 818  |   Read more..

List of all day name in a month in PHP  

You can get all the day name on a month in PHP by using the followince PHP code   $from_date = date('d-m-Y'); $to_date = date('d-m-Y', strtotime('+1 month')); $from_date = new DateTime($from_date); $to_date = new DateTime($to_date); for ($date = $from_date; $date <= $to_date; $date->modify('+1 day')) { echo $date->format('l') . "\n"; }
 
By: Tech writer  |   Total Read: 765  |   Read more..

Read xml file on php  

Here is an simple example on how you will read a xml file on php Suppose you have a file named "categories.xml" which may have the following content <?xml version="1.0" encoding="UTF-8"?> <CategoriesRoot> <Categories> <CategoryID>1</CategoryID> <CategoryName>Beverages</CategoryName> <Description>Soft drinks, coffees, teas, beer, and
 
By: Tech writer  |   Total Read: 611  |   Read more..

No one can help you  

Once there was a king who fights for money, property and power. As a result he earned a lot of money by attacking different state and people. One day the king becomes very sick. He called all best doctors for his treatments but everyone fails. He is going to die. He wishes to his family in front of doctors before death as his last wishes. When I will die make sure 1. The doctors are caring his coffin. 2. Spread out his all property on the roa
 
By: Tech writer  |   Total Read: 1078  |   Read more..

How to delete recursive files from shell command  

If you want to delete recursively all folders and files on linux shell script then follow the command. Delete the empty folders $ rmdir letters   Recursive all file and folders delete $ rm -rf letters/   To delete everything including the parent folder use the following command also $ rm -rf letters Hope this will help you to delete recursive files and folders from command line
 
By: Tech writer  |   Total Read: 895  |   Read more..

linux delete command  

If you want to delete a folder and its files then follow the command rm -f -r myFolderName here -f : forcely delete, -r recursive all file delete    
 
By: Tech writer  |   Total Read: 925  |   Read more..

linux copy command  

If you want to copy a folder all files and folder to another folder then follow the command cp -r source/directory/* /destination/directory/ For example cp -r beanmd/* /var/www/mallanza/beanmd/
 
By: Tech writer  |   Total Read: 882  |   Read more..

extract shell script command for linux  

Here is the tutorial for unzip shell script command for linux If you want to extract the tar.gz file then use the following shell script command to untar tar -xzf filename.tar.gz  If you want to extract the ZIP file then use the following shell script command to unzip Extract under the folder unzip filename.zip Extract on the same folder unzip -j filename.zip  
 
By: Tech writer  |   Total Read: 888  |   Read more..
Top 15 Posts
Google+