JIYIK CN >

Current Location:Home > Learning > PROGRAM > PHP >

All

Redirection in PHP

Publish Date:2025/04/13 Author:JIYIK Category:PHP

header() We will demonstrate another way to redirect a page in PHP using the function by sending an HTTP header to the browser . This method uses the built-in header() function in PHP, which takes Location as a parameter, and its value is t...

Full

Store Div Id in PHP variable and pass it to JavaScript

Publish Date:2025/04/13 Author:JIYIK Category:PHP

This article shows you how to div id store a in a PHP variable and pass it to JavaScript code. We will answer the following questions. What is div id ? How to div id store in a PHP variable? How to pass variables to JavaScript code? Let’s...

Full

PHP with Ajax

Publish Date:2025/04/13 Author:JIYIK Category:PHP

We will use PHP and ajax by printing a simple sum of two numbers 2 and . Also, print a php array in JSON. 3 object We will also use PHP with ajax by getting the HTML formatted output from the number division in PHP. Printing simple addition...

Full

Check if a Post exists in PHP

Publish Date:2025/04/13 Author:JIYIK Category:PHP

PHP $_POST is a super global variable that can contain key-value pairs of HTML form data submitted through the post method. We will learn different ways to check $_POST if a and contains some data in this article. These methods will use iss...

Full

Implementing callback functions in PHP

Publish Date:2025/04/12 Author:JIYIK Category:PHP

This article will show you how to create one or more callback functions and execute them using different built-in methods, user-defined functions, and static classes in PHP. Create a function in PHP callback and call_user_func execute it us...

Full

Validating Email in PHP

Publish Date:2025/04/12 Author:JIYIK Category:PHP

We will introduce a method to validate email addresses in PHP using filter_var() the function and FILTER_VALIDATE_EMAIL filter name ID. filter_var() The function takes an email as the first parameter and a filter name FILTER_VALIDATE_EMAIL...

Full

Writing error log files in PHP

Publish Date:2025/04/12 Author:JIYIK Category:PHP

When we have a large web application running in production mode, we need to monitor all errors or potential errors that our users may face. The best way to keep an eye on all possible errors is to log them to a file as they occur. This arti...

Full

Validating phone numbers in PHP

Publish Date:2025/04/12 Author:JIYIK Category:PHP

PHP has two ways to validate phone numbers, one is regular expression regex and the other is filter the method. We can use to regex set a template and validate the phone number based on that template, but filter will only exclude the unwant...

Full

Run Shell Scripts and Open Shell Files in PHP

Publish Date:2025/04/12 Author:JIYIK Category:PHP

Run Shell Scripts and Open Shell Files in PHP

PHP allows us to use shell_exec(); the shell function to process files. However, if your operating system is Windows, you should consider using the popen() and pclose() functions, because pipes are executed in text mode, which usually preve...

Full

Running PHP on Mac

Publish Date:2025/04/12 Author:JIYIK Category:PHP

In this article, we'll show you how to run PHP on your Mac. php -S Run PHP on Mac using command PHP is a server-side language. It runs on a server. Therefore, it requires a web server to run. There are different web servers like Apache HTTP...

Full

Get JSON object from URL in PHP

Publish Date:2025/04/12 Author:JIYIK Category:PHP

This article explains how to get a JSON object from a URL in PHP. file_get_contents() Get JSON object from URL in PHP using function We can use the README.mdl file_get_contents() and README.mdl json_decode() to get a JSON object from a URL....

Full

Reading text files in PHP

Publish Date:2025/04/12 Author:JIYIK Category:PHP

This article will introduce the method of reading text files line by line in PHP. fgets() Use the function to read a text file line by line in PHP We can read a text file line by line in PHP using the while read_line function with a loop. T...

Full

Using if...else shorthand in PHP

Publish Date:2025/04/12 Author:JIYIK Category:PHP

This article will show you how we can use shorthand methods to write conditionals in PHP if...else . We will use the ternary operator and the null coalescing operator in our demonstration. Introduction to PHP ternary operator We can use the...

Full

PHP Pagination

Publish Date:2025/04/12 Author:JIYIK Category:PHP

This article will show you a way to perform paging in PHP using the LIMIT clause and the SQL INSERT SELECT statement in PHP. We will use LIMIT the LIMIT clause to select a specific number of rows starting from a specific index to display as...

Full

Header location in PHP

Publish Date:2025/04/12 Author:JIYIK Category:PHP

This article will introduce header() the concept of the function and its syntax in PHP. It will cover the rules for writing headers in PHP. This approach also applies to Content-Type the and Content-Disposition headers. location: We will al...

Full

Scan to Read All Tech Tutorials

Social Media
  • https://www.github.com/onmpw
  • qq:1244347461

Hottest

Tags

Scan the Code
Easier Access Tutorial