PHP

Php syntax checker
17
2021-03-04 08:26:17

In this article, you have become familiar with the basic syntax in PHP. You may find a lot of confusing parts in some of the code examples above, but that's okay because you will understand it after reading a few more articles later. In the following article, I will show you the concept of variables because if you learn basic PHP , the use of variables is a lot.

Read more  

The empty() function in Php
173
2021-02-02 08:41:11

The empty() function is a function that specializes in checking empty data in PHP

Read more  

Comparing json_encode and serialize in PHP
207
2021-01-19 14:15:01

Both functions json_encode and serialize in PHP can be used to convert an object or array value to a string type. However, the conversion logic of these two functions is not the same. Also, with the same value used for conversion, the last received string has completely different formats.

Read more  

The serialize() function in PHP
114
2021-01-19 13:58:47

The function serialize() encodes the variable value passed into a special string, the function returns the encoded string. Note: the function serialize() can be used with an array of data.

Read more  

Php Random String
130
2021-01-14 15:48:13

php random number In this tutorial, we will cover different techniques for generating random numbers and literal strings in PHP. Some of them will be encrypted, while others are just for general needs, like assigning a pseudo-random filename or generating a URL and suggesting a username.

Read more  

Install MAMP to create a stable PHP and MYSQL runtime environment
8015
2021-01-08 15:39:10

Mamp is an acronym for (Macintosh, Apache, MySQL, and PHP) specific to the Mac operating system, later extended to Windows. Mamp is used to run code on localhost to help programmers to install each part of PHP, MYSQL, Apache ... It encapsulates everything, just start, reset and stop. If you've ever used XAMP, it's the same.

Read more  

Install XAMPP
211
2020-12-30 23:42:20

Xampp is a Web server creator with built-in Apache, PHP, MySQL, FTP Server, Mail Server, phpMyAdmin, and tools like phpMyAdmin. Unlike Appserv, Xampp has a quite convenient management program, allowing to proactively turn on / off or restart server services at any time.

Read more  

Install getcomposer
223
2020-12-30 23:27:07

getcomposer In the past, we were often annoyed with the dozens of third-party libraries that needed to be managed, so it was difficult to update the messy installs. But that is now only the past, since the Composer was born has completely changed everything. What is Composer and how is it capable? This article will guide you, help you learn about the Composer and its benefits!

Read more  

Php header
172
2020-12-29 18:39:39

Remember that php header() must be called before sending anything to the output such as HTML tags, blank lines in a file, or PHP. This is a very common error when reading code with include or require, file access functions or functions, and there are spaces or blank lines in the output before header() is called. The same problem is encountered when using PHP / HTML files.

Read more  

Upload File in PHP
219
2020-12-23 21:16:36

A PHP script can be used with an HTML form allowing users to upload files to the server. These files are first uploaded to a temporary directory, then moved to a destination by a PHP script.

Read more  

Email using PHP
269
2020-12-11 22:08:52

PHP must be configured correctly in the php.ini file with details about how your system sends emails. Open the available php.ini in /etc/ directory and look for the section that starts with [mail function]. Windows users should make sure that there are 2 directives provided. The first one is called SMTP, which defines your email server address. The second is called sendmail_from, which defines your own email address.

Read more  

Session In PHP
315
2020-12-17 03:13:16

Session In PHP Another way to make data accessible on different pages of an entire Website is to use a PHP Session. A session creates a file in a temporary directory on the server where the session variables are registered and their values ​​are stored. This data will be available to all pages on the site during the visit to that site.

Read more  

Cookie in PHP
303
2020-11-28 00: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
335
2020-11-06 22: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
341
2020-11-06 21: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