Cookie in PHP
52
2020-11-27 17:01:02

Cookies in PHP Cookies are text files stored on the client and they are kept for tracking purposes. PHP supports HTTP Cookies. There are 3 steps to identify the user who returns: Server-side script sends a set of cookies to the browser. For example name, age, ... The browser stores this information on the local machine for future use.

Read more  

Function in PHP
116
2020-11-06 15:07:41

Functions in PHP are similar to other programming languages. A function is a piece of code that takes one or more input in a sample of parameters, and performs some processing and returns a value. In the previous chapter we were familiar with functions like fopen() and fread() ... They are built-in functions, but PHP also gives you the option to create your own function.

Read more  

File & I/O In PHP
107
2020-11-06 14:50:05

When a file is opened using the fopen() function, it can be read with a fread() function in PHP. This function requires 2 parameters. They must be file pointers and the length of the file in bytes. The length of the file can be determined using the filesize() function in PHP, which takes the filename as an argument and returns the size of the file in bytes. Follow these steps to read a file with PHP: Open the file using the fopen() function . Get the file length using the filesize() function. Read the contents of the file using the fread() function. Close the file using the fclose() function.

Read more  

PHP - File Inclusion
164
2020-10-23 11:07:00

require() or include() You can insert the contents of one PHP file into another PHP file before the server executes it. There are 2 functions in PHP that can be used to do this.

Read more  

PHP GET & POST methods
231
2020-10-19 19:02:01

There are two ways for the client to send information to Web Server: GET method POST method Before the browser sends the information, it encodes it using a schema called URL encoding. In this schema, the name / value pairs associated with the equal sign and the different pairs are separated by slashes & .

Read more  

String in PHP
201
2020-10-16 08:17:40

Strings in PHP There is no limit to the length of the string, which can be arbitrarily long if the memory allows. Strings delimited by double quotes are handled by PHP in two ways: Character strings beginning with (\) are replaced with a special character Variables (starting with $) are replaced with a string representation of their value.

Read more  

Website design with Flexbox FULL
261
2020-10-10 11:12:17

CSS Flexbox is a solution born to replace floats. Help us to design website interface easier. Flexbox is born to be considered the revolution of CSS3 , so if you learn web programming it is impossible not to hold it.

Read more  

Loops in PHP
214
2020-10-05 09:01:19

Loops in PHP are used to execute the same block of code a specified number of times. PHP supports the following 4 types of loops: For Loop - Loops through a block of code a specified number of times. While Loop - Loops through a block of code if and for as long as a condition has been specified true. Do ... while loop - Loops through a block of code once, and then repeats that loop as long as a given condition becomes true. Foreach loop - Loops through a block of code for each element in an array.

Read more  

PHP if, else, switch statements
210
2020-10-02 15:28:46

The if, elseif… else, and the inner switch are used to control flow based on different conditions.

Read more  

Operators in PHP
220
2020-10-02 15:10:04

What is an operator? The simple answer from the 4 + 5 expression is equal to 9 . Here, 4 and 5 are called operands and + is called operator. The PHP language supports the following types of operators:

Read more  

Constants in PHP
329
2020-09-17 19:14:43

A constant is a name or an identifier for a single value. The value of the constant cannot be changed during script execution. By default, a constant is case sensitive. By convention, constant identifiers are always uppercase. Constant names begin with a letter or an underscore (_), followed by any number of letters, numbers, or underscores. If you have defined a constant, it can never be changed or redefined.

Read more  

PHP syntax
329
2020-09-08 16:45:35

PHP syntax. Before you start programming in any language, the basic syntax and program structure is a very important part. This chapter introduces you to basic PHP syntax, including: php tag, comment, print command, echo command, and comparison of print and echo commands .

Read more  

Install PHP on Windows, Linux and Mac OS X
228
2020-09-07 16:28:56

In order to develop and run PHP pages, the following 3 basic components need to be installed on your computer system. Web Server - PHP will work with almost all Web Server software, including Microsoft's Internet Information Server (IIS), but then Apache Server is more commonly used. Download Apache for free from: http://httpd.apache.org/download.cgi

Read more  

Configure PHP.INI file
244
2020-09-07 16:20:39

The PHP configuration file, php.ini, is the last and most direct step that affects PHP's functionality. This php.ini file is read every time PHP is initialized, in other words, whenever httpd is restarted for the Module Version or with each Script execution for CGI version. If your changes don't show up, remember to stop and restart httpd. If still not showing, use phpinfo() to check the path to php.ini.

Read more  

Configure Apache for PHP
233
2020-09-07 16:13:37

Apache uses the httpd.conf file for global settings, and the .htaccess file for per-directory access settings. Apache versions divide httpd.conf into three files (access.conf, httpd.conf, and srm.conf), and some users still prefer this arrangement.

Read more