Blog

python tutorials and learn python

Created with Sketch.

PHP dirname

PHP dirname Summary: in this tutorial, you will learn how to use the PHP dirname() function to get the parent directory’s path of a file or directory path. Introduction to the PHP dirname() function The dirname() function accepts a path and returns a parent directory’s path: dirname ( string $path , int $levels = 1…
Read more

PHP glob

PHP glob Summary: in this tutorial, you’ll learn how to use the PHP glob() function to get the list of files and directories that match a pattern. Introduction to the PHP glob() function The glob() function finds pathnames that match a pattern. Here’s the syntax of the glob() function: glob ( string $pattern , int…
Read more

PHP Directory

PHP Directory Summary: in this tutorial, you will learn how to work with directories using various built-in functions in PHP. Basic directory operations PHP provides a set of handy functions that allow you to work with directories effectively. To manage a directory, you need to get a directory handle. To get the directory handle of…
Read more

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