Table of Contents
回复讨论(解决方案)
Home Backend Development PHP Tutorial 关于zend studio软件警告的问题。

关于zend studio软件警告的问题。

Jun 23, 2016 pm 01:48 PM
studio zend warn software

代码运行没有问题,在其它软件编写也没问题,但是在zend studio里就会出现一个黄色的小警告,用过此软件的知道如何屏蔽这个警告吗?


回复讨论(解决方案)

警告啥?

window->preference->php->Code Analyzer  在右边设置各种警告 错误提示...
黄色警告提醒你要注意的地方或者写的代码不够严谨,对你写代码有益无害,为什么要屏蔽它

window->preference->php->Code Analyzer 在右边设置各种警告 错误提示...
黄色警告提醒你要注意的地方或者写的代码不够严谨,对你写代码有益无害,为什么要屏蔽它


有的警告是对的,可以改的掉,但有的警告改不掉,比如说应用其它文件里的变量,因为不是在本页面定义的,它就会显示警告说找不到它,但是可以正常运行。最烦的事引用其它页面的类是,因为不是在本页面实例化,当调用一个方法就警告一下,一页下来太多的警告。但我用其它软件写时,又没有这些警告了。

比如出现以下问题
我有一个配置文件 例如 conn.php吧 

里面有 $a=50;(就这样打个比方吧)!

我在另外一个 index.php文件中 做一个判断吧,

include 'conn.php' ;

echo $a;
这时候 zend studio 7.1 就提示我 变量为空值,Undefined variable '$a'
但还是正常运行50,但警告就莫名奇妙了。

我明白你的意思 如果你这套程序在zend studio中是以一个项目的形式开发,它会智能的关联整个项目的所有文件,判断各种变量、函数、实例 是否合法,否则它就不是 'IDE'了
你的程序中出现太多的警告,多半是把zend studio当成简单的编辑器使用了,你新建个项目把程序导进去再试试

如果可以的话,建项目

比如出现以下问题
我有一个配置文件 例如 conn.php吧 

里面有 $a=50;(就这样打个比方吧)!

我在另外一个 index.php文件中 做一个判断吧,

include 'conn.php' ;

echo $a;
这时候 zend studio 7.1 就提示我 变量为空值,Undefined variable '$a'
但还是正常运行50,但警告就莫名奇……

当然你也可以设置警告的级别 甚至不出现警告

如何建项目啊,我就是在文件里新建PHP PROJECT 

忽略,即可

Window > Preference > General > Editors > Annotations > Warnings 右边全部取消就可以了。

比如出现以下问题
我有一个配置文件 例如 conn.php吧 

里面有 $a=50;(就这样打个比方吧)!

我在另外一个 index.php文件中 做一个判断吧,

include 'conn.php' ;

echo $a;
这时候 zend studio 7.1 就提示我 变量为空值,Undefined variable '$a'
但还是正常运行50,但警告就莫名奇妙了。





把$a在要用到的文件中写作 global $a就行了呗
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 software is bonjour and can it be uninstalled? What software is bonjour and can it be uninstalled? Feb 20, 2024 am 09:33 AM

Title: Explore the Bonjour software and how to uninstall it Abstract: This article will introduce the functions, scope of use and how to uninstall the Bonjour software. At the same time, it will also be explained how to use other tools to replace Bonjour to meet the needs of users. Introduction: Bonjour is a common software in the field of computer and network technology. Although this may be unfamiliar to some users, it can be very useful in some specific situations. If you happen to have Bonjour software installed but now want to uninstall it, then

What software is crystaldiskmark? -How to use crystaldiskmark? What software is crystaldiskmark? -How to use crystaldiskmark? Mar 18, 2024 pm 02:58 PM

CrystalDiskMark is a small HDD benchmark tool for hard drives that quickly measures sequential and random read/write speeds. Next, let the editor introduce CrystalDiskMark to you and how to use crystaldiskmark~ 1. Introduction to CrystalDiskMark CrystalDiskMark is a widely used disk performance testing tool used to evaluate the read and write speed and performance of mechanical hard drives and solid-state drives (SSD). Random I/O performance. It is a free Windows application and provides a user-friendly interface and various test modes to evaluate different aspects of hard drive performance and is widely used in hardware reviews

What to do if WPS Office cannot open the PPT file - What to do if WPS Office cannot open the PPT file What to do if WPS Office cannot open the PPT file - What to do if WPS Office cannot open the PPT file Mar 04, 2024 am 11:40 AM

Recently, many friends have asked me what to do if WPSOffice cannot open PPT files. Next, let us learn how to solve the problem of WPSOffice not being able to open PPT files. I hope it can help everyone. 1. First open WPSOffice and enter the homepage, as shown in the figure below. 2. Then enter the keyword "document repair" in the search bar above, and then click to open the document repair tool, as shown in the figure below. 3. Then import the PPT file for repair, as shown in the figure below.

CrystalDiskinfo usage tutorial-What software is CrystalDiskinfo? CrystalDiskinfo usage tutorial-What software is CrystalDiskinfo? Mar 18, 2024 pm 04:50 PM

CrystalDiskInfo is a software used to check computer hardware devices. In this software, we can check our own computer hardware, such as reading speed, transmission mode, interface, etc.! So in addition to these functions, how to use CrystalDiskInfo and what exactly is CrystalDiskInfo? Let me sort it out for you! 1. The Origin of CrystalDiskInfo As one of the three major components of a computer host, a solid-state drive is the storage medium of a computer and is responsible for computer data storage. A good solid-state drive can speed up file reading and affect consumer experience. When consumers receive new devices, they can use third-party software or other SSDs to

How to set the keyboard increment in Adobe Illustrator CS6 - How to set the keyboard increment in Adobe Illustrator CS6 How to set the keyboard increment in Adobe Illustrator CS6 - How to set the keyboard increment in Adobe Illustrator CS6 Mar 04, 2024 pm 06:04 PM

Many users are using the Adobe Illustrator CS6 software in their offices, so do you know how to set the keyboard increment in Adobe Illustrator CS6? Then, the editor will bring you the method of setting the keyboard increment in Adobe Illustrator CS6. Interested users can take a look below. Step 1: Start Adobe Illustrator CS6 software, as shown in the figure below. Step 2: In the menu bar, click the [Edit] → [Preferences] → [General] command in sequence. Step 3: The [Keyboard Increment] dialog box pops up, enter the required number in the [Keyboard Increment] text box, and finally click the [OK] button. Step 4: Use the shortcut key [Ctrl]

What kind of software is bonjour? Is it useful? What kind of software is bonjour? Is it useful? Feb 22, 2024 pm 08:39 PM

Bonjour is a network protocol and software launched by Apple for discovering and configuring network services within a local area network. Its main role is to automatically discover and communicate between devices connected in the same network. Bonjour was first introduced in the MacOSX10.2 version in 2002, and is now installed and enabled by default in Apple's operating system. Since then, Apple has opened up Bonjour's technology to other manufacturers, so many other operating systems and devices can also support Bonjour.

How to resolve an incompatible software attempt to load with Edge? How to resolve an incompatible software attempt to load with Edge? Mar 15, 2024 pm 01:34 PM

When we use the Edge browser, sometimes incompatible software attempts to be loaded together, so what is going on? Let this site carefully introduce to users how to solve the problem of trying to load incompatible software with Edge. How to solve an incompatible software trying to load with Edge Solution 1: Search IE in the start menu and access it directly with IE. Solution 2: Note: Modifying the registry may cause system failure, so operate with caution. Modify registry parameters. 1. Enter regedit during operation. 2. Find the path\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Micros

What software is photoshopcs5? -photoshopcs5 usage tutorial What software is photoshopcs5? -photoshopcs5 usage tutorial Mar 19, 2024 am 09:04 AM

PhotoshopCS is the abbreviation of Photoshop Creative Suite. It is a software produced by Adobe and is widely used in graphic design and image processing. As a novice learning PS, let me explain to you today what software photoshopcs5 is and how to use photoshopcs5. 1. What software is photoshop cs5? Adobe Photoshop CS5 Extended is ideal for professionals in film, video and multimedia fields, graphic and web designers who use 3D and animation, and professionals in engineering and scientific fields. Render a 3D image and merge it into a 2D composite image. Edit videos easily

See all articles