Category Archives: PHP

PHP-Regular Expression

A regular expression can be considered as the sequence of characters that allows you to use the PHP functionality of pattern matching. Regular expression helps you to search for a particular string, replace one string from another string. PHP supports two types of regular expressions on which you can perform different functions. POSIX regular expression PERL style regular… Read More »

PHP – Coding Standards

In any programming language, it is important that we follow a particular standard or protocol. This allows different developers or coders to remain on the same page as their peer developers. It makes the code understandable and manageable. There are many reasons that influence developers to stick to these standards. Following the same coding standard allows your team… Read More »

PHP – File Uploading

You can upload a file to the server by using a PHP script with HTML forms. Before uploading the file to the original destination it gets uploaded to a temporary directory by a PHP script. The temporary directory information is mentioned in the phpinfo.php page which is specified as upload_tmp_dir. You can mention the maximum size for the… Read More »

PHP – Sessions

PHP sessions allow you to access data among different pages of an entire website. A temporary file has been created by the session that is stored at the server along with its data and the session variables and the information will be then available to all pages. You can decide where to store this session file by setting… Read More »

PHP – Cookies

PHP – Cookies Cookies are files that are used for tracking and are stored on the client’s computer. PHP supports cookies that keep tracks of their returning users. The server sends the cookies that may contain information to the browser. All the sent information is then stored at the local system by the browser. If the user comes… Read More »

PHP – Files & I/O

PHP – Files & I/O PHP allows you to perform some file functions like opening a file, reading a file, writing a file and closing a file from within the program. 1. Opening and closing file PHP supports the use of fopen() function to open a file that takes two parameters to be passed. The first parameter is… Read More »

PHP – File Inclusion

PHP – File Inclusion PHP supports the use of two functions that allows you to put the content of one PHP file to another PHP file. After the inclusion, the file get executes by the server. The two functions are: include() function require() function Using this feature of PHP you can easily use different functions, headers or elements… Read More »