Category: PHP Tutorial

python tutorials and learn python

Created with Sketch.

PHP File Permissions

PHP File Permissions Summary: in this tutorial, you will learn how to deal with PHP file permissions, including checking and changing file permissions. File permissions specify what a user can do with a file, e.g., reading, writing, or executing it. Notice that PHP automatically grants appropriate permissions behind the scenes. For example, if you create a new…
Read more

PHP filesize

PHP filesize Summary: in this tutorial, you will learn how to use the PHP filesize() function to get the size of a file. Introduction to the PHP filesize() function The filesize() function returns the size of a given file in bytes: filesize ( string $filename ) : int|false Code language: PHP (php) The filesize() function…
Read more

PHP CSV

PHP CSV Summary: in this tutorial, you will learn how to deal with CSV files in PHP, including creating and reading CSV files. A quick introduction to CSV files CSV stands for comma-separated values. A CSV file is a text file that stores tabular data in the form of comma-separated values. A CSV file stores…
Read more

PHP Rename File

PHP Rename File Summary: in this tutorial, you will learn how to rename a file in PHP by using the rename() function. Introduction to the PHP rename file function To rename a file to the new one, you use the rename() function: rename ( string $oldname , string $newname , resource $context = ? )…
Read more

PHP Delete File

PHP Delete File Summary: in this tutorial, you will learn how to delete a file in PHP using the unlink() function. Introduction to the PHP delete file function To delete a file, you use the unlink() function: unlink ( string $filename , resource $context = ? ) : bool Code language: PHP (php) The unlink()…
Read more

PHP Copy File

PHP Copy File Summary: in this tutorial, you will learn how to copy a file by using the PHP copy() file function from one location to another. Introduction to the PHP copy() file function To copy a file from one location to another, you use the copy() function: copy ( string $source , string $dest…
Read more

PHP Download File

PHP Download File Summary: in this tutorial, you will learn how to download a file in PHP using the readfile() function. Introduction to the PHP readfile() function The readfile() function reads data from a file and writes it to the output buffer. Here’s the syntax of the readfile() function: readfile ( string $filename , bool…
Read more

PHP file() Function

PHP file() Function Summary: in this tutorial, you will learn how to use the PHP file() function to read the entire file into an array. Introduction to the PHP file() function The file() function reads an entire file specified by a $filename into an array: file ( string $filename , int $flags = 0 ,…
Read more

PHP file_get_contents

PHP file_get_contents Summary: in this tutorial, you will learn how to use the PHP file_get_contents() function to read the entire file into a string. Introduction to the PHP file_get_contents() function The file_get_contents() function reads the entire file into a string. Here’s the syntax of the file_get_contents() function: file_get_contents ( string $filename , bool $use_include_path =…
Read more

PHP Read File

PHP Read File Summary: in this tutorial, you’ll learn how to read a file using the various built-in PHP functions. To read the contents from a file, you follow these steps: Open the file for reading using the fopen() function. Read the contents from the file using the fread() function. Close the file using the…
Read more