Skip to main content

Openings for different technoogies.

PHP Interview questions 5

1) what is MVC? why its been used?
Ans :      Model-view-controller (MVC) is an architectural pattern used in software engineering. Successful use of the pattern isolates business logic from user interface considerations, resulting in an application where it is easier to modify either the visual appearance of the application or the underlying business rules without affecting the other. In MVC, the model represents the information (the data) of the application; the view corresponds to elements of the user interface such as text, checkbox items, and so forth; and the controller manages the communication of data and the business rules used to manipulate the data to and from the model. WHY ITS NEEDED IS 1 Modular separation of function 2 Easier to maintain 3 View-Controller separation means:
A Tweaking design (HTML) without altering code B รข€” Web design staff can modify UI without understanding code
                
2) what is framework? how it works? what is advantage?
Ans :      In general, a framework is a real or conceptual structure intended to serve as a support or guide for the building of something that expands the structure into something useful. Advantages : Consistent Programming Model Direct Support for Security Simplified Development Efforts Easy Application Deployment and Maintenance
3) what is CURL?
Ans :      CURL means Client URL Library
curl is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS and FILE. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos), file transfer resume, proxy tunneling and a busload of other useful tricks.
CURL allows you to connect and communicate to many different types of servers with many different types of protocols. libcurl currently supports the http, https, ftp, gopher, telnet, dict, file, and ldap protocols. libcurl also supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading (this can also be done with PHP’s ftp extension), HTTP form based upload, proxies, cookies, and user+password authentication.
                
4) what is PDO ?
Ans :      The PDO ( PHP Data Objects ) extension defines a lightweight, consistent interface for accessing databases in PHP. if you are using the PDO API, you could switch the database server you used, from say PgSQL to MySQL, and only need to make minor changes to your PHP code.
While PDO has its advantages, such as a clean, simple, portable API but its main disadvantage is that it doesn't allow you to use all of the advanced features that are available in the latest versions of MySQL server. For example, PDO does not allow you to use MySQL's support for Multiple Statements.
Just need to use below code for connect mysql using PDO
try {
$dbh = new PDO("mysql:host=$hostname;dbname=databasename", $username, $password);
$sql = "SELECT * FROM employee";
foreach ($dbh->query($sql) as $row)
{
print $row['employee_name'] .' - '. $row['employee_age'] ;
}
}
catch(PDOException $e)
{
echo $e->getMessage();
}
                
5) What is PHP's mysqli Extension?
Ans :      The mysqli extension, or as it is sometimes known, the MySQL improved extension, was developed to take advantage of new features found in MySQL systems versions 4.1.3 and newer. The mysqli extension is included with PHP versions 5 and later.
The mysqli extension has a number of benefits, the key enhancements over the mysql extension being:
=>Object-oriented interface
=>Support for Prepared Statements
=>Support for Multiple Statements
=>Support for Transactions
=>Enhanced debugging capabilities
=>Embedded server support

Comments

Popular posts from this blog

Openings for different technoogies.

 

Walk in for Networking Executives On 29th Nov

Company        Infosys BPO Ltd Website          www.infosysbpo.com Eligibility        Graduates/Diploma Experience     1-3 Years Location         Chennai Infosys BPO Ltd Job Role: Networking Executives Job Summary : 1. Working experience in supporting network related queries 2. Knowledge on switches, Rouers, Hubs, LAN'S,WAN'S etc is preferred QUALIFICATION: 1. Only graduates with 10+2+3 2. Diploma 10+2+3 SKILLSETS: Good communication skills. Strong analytical and problem solving skills. EXPERIENCE 18 to 36 months experience in the relevant field only OTHERS Flexibility to work in shifts Walkins for Networking Executives on 29th Nov 2012 *****Interview Slots******* ******10:30 AM & 1:00 PM & 3:00 PM***** Walk-In Venue: Infosys BPO 3rd Floor, Hardy Towers Ramanujam IT Park Next to Tidal Taramani (Tirumanviyur...

SBI Hiring Probationary Officers

Company        SBI(State Bank Of India) Website          www.sbi.co.in Eligibility        Any Degree Experience     Freshers Location         Anywhere in India SBI(State Bank Of India) Job Role: Probationary Officers (POs) Job Summary : Eligibility Criteria: Graduation in any discipline from a recognised University or any equivalent qualification recognised as such by the Central Government. Age Limit: As on 01.01.2013 Not below 21 years and not above 30 years as on 01.01.2013 i.e candidates must have been born not earlier than 02.01.1983 and not later than 01.01.1992 (both days inclusive) ONLINE REGISTRATION OF APPLICATION: 30.01.2013 TO 23.02.2013 PAYMENT OF FEES - ONLINE : 30.01.2013 TO 23.02.2013 PAYMENT OF FEES - OFFLINE : 01.02.2013 TO 28.02.2013 DATE OF WRITTEN EXAMINATION : 28.04.2013 More Details: http://w...