Category: PHP Functions

Adding And Subtracting Dates in PHP 0

Adding And Subtracting Dates in PHP

Here are some examples by which you can add or subtract date. e.g these simple codes can find the 2 week before or after date. Subtracting Years from a date $date = “1988-08-01”; $newdate...

how to fetch all files from folder using php 0

how to fetch all files from folder using php

PHP directory listing Some times we have to display the list of all files in a directory.We can do this with the help of php function readdir(). The code to display all the files...

How to delete the file using php 0

How to delete the file using php

We can delete the file using php with the help of unlink function. Define this function like this: unlink ( string $filename [, resource $context ] ) Parameter: File name: Path to the file....

How to Create a Folder/Directory using php 0

How to Create a Folder/Directory using php

We can create a folder with the help of mkdir already defined function We can use tis function like this Description: bool mkdir ( string $pathname [, int $mode = 0777 [, bool $recursive...

A PHP Trick to Override the php.ini Configuration 0

A PHP Trick to Override the php.ini Configuration

I’m glad that my hosting provider lets me edit the php.ini configuration file directly inside of the Control Panel. But many hosting providers don’t let their users to edit the php.ini file in case...

Turn off all errors using PHP 0

Turn off all errors using PHP

If you want to turn off all the warning or errors which shows on the dynamic pages, so you can do it with the help of PHP Function. The Function is: error_reporting(0); You can...