ankitweblogic logo
W e b t u t o r i a l s

Define PHP

PHP Installation


PHP Case Sensitivity

PHP Variable

PHP Echo & Print

PHP Operators

PHP Receiving Input

PHP Decision Making

PHP Loops

PHP Jumping Statement

PHP Image Gallery

PHP Arrays

PHP File Upload

PHP String Functions

PHP Math Functions

PHP Functions

PHP Variable Scope

PHP Constant Variable

PHP Superglobals

PHP Form Validation

PHP Include Statement

PHP Filter

PHP File Handling

PHP Date Functions

PHP Cookies

PHP Session

PHP Send Emails

PHP Captcha

PHP-MySQL Connectivity

PHP MySQL Select

PHP MySQL Insert

PHP MySQL Delete

PHP MySQL Update

PHP MySQL Injection


The PHP configuration file, php.ini, is the final and most immediate way to affect PHP's functionality. The php.ini file is read each time PHP is initialized.

You can check the php ini file path from "php.ini" file under "Loaded Configuration File" option. Normally, the PHP ini file location in XAMPP is "c:\xampp\php\php.ini".

You can open PHPInfo file from PHP Dashboard or by writing the following script code.


PHP Error Reporting

The error_reporting() function specifies which errors are reported.

error_reporting(0);  // Do not display any error.
error_reporting(1);  // Display all errors.
error_reporting(E_ALL);  // display all errors.
error_reporting(E_ERROR); // display only errors.
error_reporting(E_WARNING); // display only warnings.

Comments in PHP

A comment in PHP code is a line that is not read/executed as part of the program. Its only purpose is to be read by someone who is looking at the code.
Comments can be used to understand what you are doing, or Remind yourself of what you did - Most programmers have experienced coming back to their own work a year or two later and having to re-figure out what they did. Comments can remind you of what you were thinking when you wrote the code.
PHP supports several ways of commenting:
SingleLine Comment: Single line comment is applied using two forward slashes or with a # symbol.
// This is a single-line comment
# This is also a single-line comment

MultiLine Comment:
/* This is a MultiLine comment */

Example: Comment

    echo "Comments in PHP";
    //echo "This is a Single Line Comment and will not be displayed";
    #echo "This is also a Single Line Comment.";
      echo "This is multiline comment.";
      echo "This line will not display";
      echo "This line is also a comment will not be displayed";