Home Backend Development PHP Tutorial PHP出现Notice: Undefined variable: _U in 异常请

PHP出现Notice: Undefined variable: _U in 异常请

Jun 13, 2016 am 10:11 AM
data quot request

PHP出现Notice: Undefined variable: _U in 错误请高手指点!
急。。。。以下代码10行 、14行、32行等出现“Notice: Undefined variable: _U in ”错误,请高手指点。谢谢

1 2 if (!defined('ROOT_PATH')) die('不能访问');//防止直接访问
3 include_once("account.class.php");
4
5 if (isset($_POST['valicode']) && $_POST['valicode']!=$_SESSION['valicode']){
6 //if (1!=1){
7 $msg = array("验证码错误","",$_U['query_url']."/".$_U['query_type']);
8 }else{
9 $_SESSION['valicode'] = "";
10 if ($_U['query_type'] == "list"){
11
12 }
13
14 elseif ($_U['query_type'] == "log"){
15 $data['user_id'] = $_G['user_id'];
16 $data['page'] = $_U['page'];
17 $data['epage'] = 20;
18 $data['dotime1'] = isset($_REQUEST['dotime1'])?$_REQUEST['dotime1']:"";
19 $data['dotime2'] = isset($_REQUEST['dotime2'])?$_REQUEST['dotime2']:"";
20 $data['type'] = isset($_REQUEST['type'])?$_REQUEST['type']:"";
21 $result = accountClass::GetLogList($data);
22 if (is_array($result)){
23 $pages->set_data($result);
24 $_U['account_log_list'] = $result['list'];
25 $_U['show_page'] = $pages->show(3);
26 $_U['account_num'] = $result['account'];
27 }else{
28 $msg = array($result);
29 }
30 }
31
32 elseif ($_U['query_type'] == "cash"){
33 $data['user_id'] = $_G['user_id'];
34 $result = accountClass::GetUserLog($data);
35 $_U['cash_log'] = $result;
36 $data['page'] = $_U['page'];
37 $data['epage'] = $_U['epage'];
38 $result = accountClass::GetCashList($data);
39 if (is_array($result)){
40 $pages->set_data($result);
41 $_U['account_cash_list'] = $result['list'];
42 $_U['show_page'] = $pages->show(3);;
43 }else{
44 $msg = array($result);
45 }
46 }

------解决方案--------------------
可以把notice级别信息关闭。

要想全局的就在php.ini中 改为:error_reporting = E_ALL & ~E_NOTICE 。记得重启apache。

不想全局只想在当前页面生效。在脚本中加上:error_reporting(E_ALL^E_NOTICE);

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What does php request mean? What does php request mean? Jul 07, 2021 pm 01:49 PM

The Chinese meaning of request is "request". It is a global variable in PHP and is an array containing "$_POST", "$_GET" and "$_COOKIE". The "$_REQUEST" variable can obtain data and COOKIE information submitted by POST or GET.

How to use the urllib.request.urlopen() function to send a GET request in Python 3.x How to use the urllib.request.urlopen() function to send a GET request in Python 3.x Jul 30, 2023 am 11:28 AM

How to use the urllib.request.urlopen() function in Python3.x to send a GET request. In network programming, we often need to obtain data from a remote server by sending an HTTP request. In Python, we can use the urllib.request.urlopen() function in the urllib module to send an HTTP request and get the response returned by the server. This article will introduce how to use

How to encapsulate Vue3 Axios interceptor into request file How to encapsulate Vue3 Axios interceptor into request file May 19, 2023 am 11:49 AM

1. Create a new file called request.js and import Axios: importaxiosfrom'axios'; 2. Create a function called request and export it: This will create a function called request and export it Set up a new Axios instance with a base URL. To add timeout settings in a wrapped Axios instance, you can pass the timeout option when creating the Axios instance. exportconstrequest=axios.create({baseURL:'https://example.

What is the Request object in PHP? What is the Request object in PHP? Feb 27, 2024 pm 09:06 PM

The Request object in PHP is an object used to handle HTTP requests sent by the client to the server. Through the Request object, we can obtain the client's request information, such as request method, request header information, request parameters, etc., so as to process and respond to the request. In PHP, you can use global variables such as $_REQUEST, $_GET, $_POST, etc. to obtain requested information, but these variables are not objects, but arrays. In order to process request information more flexibly and conveniently, you can

php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 Jun 13, 2016 am 10:23 AM

php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code

What is request in PHP What is request in PHP Jun 01, 2023 am 10:12 AM

Request in PHP refers to request. It is a super global variable in PHP. It is used to collect data submitted by HTML forms and parameters in URLs. It can obtain data from GET and POST requests at the same time. Note that $_request is an associative array. , where the keys are the names of the form fields and the values ​​are the values ​​of the form fields. When using the $_request variable, user-entered data should always be validated and filtered to avoid security issues.

The role and significance of Request in PHP The role and significance of Request in PHP Feb 27, 2024 pm 12:54 PM

The role and significance of Request in PHP In PHP programming, Request is a mechanism for sending requests to the Web server. It plays a vital role in Web development. Request is mainly used to obtain data sent by the client, such as form submission, GET or POST request, etc. Through Request, the data input by the user can be obtained, and the data can be processed and responded to. This article will introduce the role and significance of Request in PHP and give specific code examples.

What data is in the data folder? What data is in the data folder? May 05, 2023 pm 04:30 PM

The data folder contains system and program data, such as software settings and installation packages. Each folder in the Data folder represents a different type of data storage folder, regardless of whether the Data file refers to the file name Data or the extension. Named data, they are all data files customized by the system or program. Data is a backup file for data storage. Generally, it can be opened with meidaplayer, notepad or word.

See all articles