get_magic_quotes_gpc()不能用怎么处理
get_magic_quotes_gpc()不能用怎么办
刚学php三天,希望高手们多多指教,谢谢哈
我用的编译软件是php5.4 。我在我的程序中使用了echo get_magic_quotes_gpc()函数来判断环境,从而决定输入数据库的信息是否需要设置转码。代码写好后在编译软件上没有显示错误,但是我打开浏览器却显示Deprecated: Function get_magic_quotes_gpc() is deprecated in.....。 于是我写了个测试用的语句echo get_magic_quotes_gpc();结果在浏览器上还是如此。
请问这种问题怎么解决,或者还有没有其它的方法来判断输入数据库的信息是否需要转码?
------解决方案--------------------
这个函数已经抛弃了,所以也就不需要再使用了.
可以使用addslashes()对提交的变量进行过滤.
------解决方案--------------------
到了php5.4 已经移除了这个功能。你直接用mysql_real_escape_string() 或者 addslashes 进行转义。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

If you are an IT administrator or technology expert, you must be aware of the importance of automation. Especially for Windows users, Microsoft PowerShell is one of the best automation tools. Microsoft offers a variety of tools for your automation needs, without the need to install third-party applications. This guide will detail how to leverage PowerShell to automate tasks. What is a PowerShell script? If you have experience using PowerShell, you may have used commands to configure your operating system. A script is a collection of these commands in a .ps1 file. .ps1 files contain scripts executed by PowerShell, such as basic Get-Help

PHPDeprecated: Functionsplit()isdeprecated-Solution When developing with PHP, we may encounter the following warning message: PHPDeprecated: Functionsplit()isdeprecated. What this warning means is that the split() function has been deprecated and its use is no longer recommended in the latest PHP versions. This article will explore this problem and provide solutions

Previously, MagicEden, a mainstream NFT market on the SOL chain, launched the Launchpad function. Prior to this, PANews has introduced the operating status of MagicEden and provided analysis on optimizing operating methods and investment methods for NFT trading platforms and users. Recently, MagicEden launched new activities in terms of operations and introduced diamond rewards to motivate users to use its products. In this article, PANews will explain in detail how to get MagicEden’s diamond reward and evaluate whether this reward is worth earning. Are MagicEden Diamond Rewards worth earning? According to the official blog, the MagicEden platform now offers users more long-term benefits through Diamond Rewards empowerment.

1. Java calls post interface 1. Use URLConnection or HttpURLConnection that comes with java. There is no need to download other jar packages. Call URLConnection. If the interface response code is modified by the server, the return message cannot be received. It can only be received when the response code is correct. to return publicstaticStringsendPost(Stringurl,Stringparam){OutputStreamWriterout=null;BufferedReaderin=null;StringBuilderresult=newSt

According to news on June 13, today evening, Honor’s first small folding screen Honor Magic VFlip officially debuted. Different from other small foldables, Honor MagicVFlip brings the industry's largest vertically folding magic external screen. Its screen size is 4.0 inches, using a four-curved and equal-depth design. The screen-to-body ratio has reached an unprecedented 85%. From then on, the external screen is no longer The "secondary screen" is the main screen both inside and outside. At the same time, Honor MagicVFlip external screen also has screen quality comparable to flagships, industry-leading Honor eye protection screen, and full-scenario smart interaction. It is reported that the Honor MagicVFlip external screen is a global low-power LTPO external screen that achieves an industry-leading local peak brightness of 2500nit.

The magic system cannot be upgraded to Hongmeng, because the magic system belongs to Honor phones, and Honor has been separated from Huawei and is no longer a subsidiary of Huawei. Therefore, Honor phones released after November 17, 2020 do not support upgrading to Hongmeng. systematic.

In Linux, URL or Curl client is a popular command line utility that allows you to transfer data over the network using various protocols such as HTTPS, HTTP, FTP, etc. It allows you to send and receive data using its get, post and request methods. Among them, you need to use the "get" method frequently. Therefore, it becomes crucial to learn various methods and various options that you can use to increase your productivity. "Performing a curl operation is as simple as entering a few simple commands. Although it seems simple, many users do not fully realize its potential. Therefore, this short guide provides some information on how to perform curl operations on Linux systems. Example using the "curlget" command." Curl

According to news on June 26, today, at the Shanghai MWC, Honor CEO Zhao Ming announced that Honor Magic V3 will be launched soon. This new product will challenge the new realm of foldable screens and thinness. Zhao Ming said that 12 months after the release of Honor MagicV2, no one has broken the record of thinness and lightness. Only Honor can surpass Honor. In July last year, the Honor MagicV2 had a folded thickness of only 9.9mm, an unfolded thickness of 4.7mm, and a weight of 231g. It broke the boundary between a candy bar machine and a folding screen, because when closed, it was almost as thick as a candy bar machine. and weight. It is reported that Honor MagicV2 uses the latest components such as screen, PU material, hinge, heat dissipation system, antenna, Type-C interface, fingerprint recognition, speakers, etc.
