NEWS & UPDATES >> BCA BCSP064 Synopsis & Project Work Started for DEC 2017, IGNOU MCA MCSP060 Synopsis Work Started for DEC 2017, CONTACT 4 IGNOU Mini Project

IGNOU BCA MCA Students - VIVA Question Answer for PHP Part VI

IGNOU BCA MCA Students - VIVA Question Answer for PHP

PHP Selected Question Answer - PART VI


1.  How to delete a file from the system
Unlink() deletes the given file from the file system.

2.  How to get the value of current session id?
session_id() function returns the session id for the current session.

3.  What are the differences between mysql_fetch_array(), mysql_fetch_object(), mysql_fetch_row()?
o    Mysql_fetch_array Fetch a result row as an associative array, a numeric array, or both.
o    mysql_fetch_object ( resource result ) Returns an object with properties that correspond to the fetched row and moves the internal data pointer ahead. Returns an object with properties that correspond to the fetched row, or FALSE if there are no more rows
o    mysql_fetch_row() fetches one row of data from the result associated with the specified result identifier. The row is returned as an array. Each result column is stored in an array offset, starting at offset 0.

4.  What are the different types of errors in PHP ?
Here are three basic types of runtime errors in PHP:
o    1. Notices: These are trivial, non-critical errors that PHP encounters while executing a script - for example, accessing a variable that has not yet been defined. By default, such errors are not displayed to the user at all - although you can change this default behavior.
o    2. Warnings: These are more serious errors - for example, attempting to include() a file which does not exist. By default, these errors are displayed to the user, but they do not result in script termination.
o    3. Fatal errors: These are critical errors - for example, instantiating an object of a non-existent class, or calling a non-existent function. These errors cause the immediate termination of the script, and PHP's default behavior is to display them to the user when they take place.

5.  what is sql injection ?
SQL injection is a malicious code injection technique.It exploiting SQL vulnerabilities in Web applications

6.  What is x+ mode in fopen() used for?
Read/Write. Creates a new file. Returns FALSE and an error if file already exists

7.  How to find the position of the first occurrence of a substring in a string
strpos() is used to find the position of the first occurrence of a substring in a string

8.  What is PEAR?

PEAR is a framework and distribution system for reusable PHP components.The project seeks to provide a structured library of code, maintain a system for distributing code and for managing code packages, and promote a standard coding style.PEAR is broken into three classes: PEAR Core Components, PEAR Packages, and PECL Packages. The Core Components include the base classes of PEAR and PEAR_Error, along with database, HTTP, logging, and e-mailing functions. The PEAR Packages include functionality providing for authentication, networking, and file system features, as well as tools for working with XML and HTML templates.

No comments:

Post a Comment