Blog

python tutorials and learn python

Created with Sketch.

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

PHP File Exists

PHP File Exists Summary: in this tutorial, you will learn how to check if a file exists in PHP using the file_exists(), is_file(), is_readable(), and is_writable() functions. PHP provides some useful functions that allow you to check if a file exists. Let’s examine these functions and how to use them effectively. Check if a file…
Read more

PHP Open File

PHP Open File Summary: in this tutorial, you will learn how to open a file in PHP using the fopen() function. Introduction to the PHP fopen() function Before reading from or writing to a file, you need to open it. To open a file, you use the fopen() function as follows: fopen ( string $filename…
Read more

PHP Remember Me

PHP Remember Me Summary: in this tutorial, you’ll learn to securely implement the remember me feature in PHP. Introduction to the PHP remember me feature When users log in to a web application and then close web browsers, the session cookies associated with the logins expire immediately. It means that if the users access the…
Read more

PHP Email Verification

PHP Email Verification Summary: in this tutorial, you’ll learn how to verify the new account’s email address securely using an activation link. Introduction to the PHP email verification for new accounts In previous tutorials, you learned how to create a registration form that allows users to register for accounts. And you also learned how to…
Read more

PHP Login

PHP Login Summary: in this tutorial, you’ll learn how to create a login form using a username and password. Prerequisites To start this tutorial, you need to complete the previous tutorial that creates a registration form. Introduction to the PHP login form In the previous tutorial, you learned how to create a form that allows…
Read more

PHP Registration Form

PHP Registration Form Summary: in this tutorial, you’ll learn how to create a PHP registration form from scratch. Introduction to PHP registration form In this tutorial, you’ll create a user registration form that consists of the following input fields: Username Email Password Password confirmation Agreement checkbox Register button When a user fills out the form…
Read more

PHP password_verify

PHP password_verify Summary: in this tutorial, you’ll learn to use the PHP password_verify() function to check if a password matches a hashed password. Introduction to the PHP password_verify() function When dealing with passwords, you should never store them in the database as plain text. And you should always hash the passwords using a secure one-way…
Read more