What is the difference between the functions unlink and unset?
unlink()-deletes the given file from the file system.unset() -makes a variable undefined.
How to set cookies?
setcookie('variable','value','time');variable - name of the cookie variablevalue - value of the cookie variabletime - expiry timeExample:<?phpsetcookie('Test',$i,time()+3600);?>Test - cookie variable name$i - value of the variable 'Test'time()+3600 - denotes that the cookie will expire after an one hour
How many types of Inheritances used in php and how we achieve it?
As far PHP concern it only support single Inheritance in scripting. we can also use interface to achieve multiple inheritance.
What is a .htacces file
.htaccess is a configuration file running on Apache server.These .htaccess file used to change the functionality and features of apache web server . e.g .htaccess file used for url rewrite . .htaccess file used to make the site password protected. .htaccess file can restrict some ip addresses ,so that on restricted ip adresses site will not open.
How to store the uploaded file to the final location?
move_uploaded_file( string filename, string destination)
What is difference between MyISAM and InnoDB storage engines in mysql.
1 : InnoDB provides us row level locking while MyISAM provides us table level locking.2 : InnoDB offers foreign key constraints wheres in MyISAM does not have foreign key constraints.3 : InnoDB does not have full text search wheres MyISAM provides us full text search.
What is the use of header() function in php?
The header() function sends a raw HTTP header to a client. We can use header() function for redirection of pages. It is important to notice that header() must be called before any actual output is seen..
How can we know the number of days between two given dates using php?
<?php$tomorrow = mktime(0, 0, 0, date("m") , date("d")+1, date("Y"));$lastmonth = mktime(0, 0, 0, date("m")-1, date("d"), date("Y"));echo ($tomorrow-$lastmonth)/86400;?>
Advertise with Us
RRB ALP & Technicians
Copyright © 2019 Sawaal.com | All Rights Reserved