Home > Backend Development > PHP Problem > What to do if something goes wrong with php get

What to do if something goes wrong with php get

藏色散人
Release: 2023-03-07 16:26:02
Original
3806 people have browsed it

Solution to php get error: 1. Use the "if(isset($_GET['id'])){}else{}" method; 2. Add "error_reporting(0)" to the first line of php ;" Just remove the error message.

What to do if something goes wrong with php get

Recommended: "PHP Video Tutorial"

php When using $_GET to obtain information is empty, Error reporting solutions

In PHP, when using $_GET, $_SESSION and other methods to obtain information, if the data is empty, an error will be reported. Find solutions online such as

if(isset($_GET['id'])){
}else{
}
Copy after login

But The error message is not removed.

My solution: If there are only such errors, add error_reporting(0); in the first line of php to remove the error message from the browser page.

The above is the detailed content of What to do if something goes wrong with php get. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template