PHP提示Warning:phpinfo() has been disabled函数禁用的解决方法
这篇文章主要介绍了PHP提示Warning:phpinfo() has been disabled函数禁用的解决方法,涉及针对配置文件中禁用函数的修改技巧,非常具有实用价值,需要的朋友可以参
本文实例讲述了bs/php/2014040278544.html">PHPbs/javascript/2013110861152.html">提示Warning:phpinfo() has been disabled函数禁用的解决方法。分享给大家供大家参考。具体分析如下:
今天在一朋友服务器测试一个网站时发现我在测试phpinfo时碰到PHP Warning:phpinfo() has been disabled for security reasons 提示了,按话的意思我总结了解决办法,下面我们一起来看看吧.
在运行phpinfo时碰到提示如下:PHP Warning: phpinfo() has been disabled for security reasons in XX.php on line XX
这段话的意思是告诉我们由于安全考虑 phpinfo() 函数被禁用,如果你有服务器管理权限请修改 php.ini 配置文件参数并重启apache 重新启用.
打开php安装路径打开php.ini文件,具体实例:在php.ini中存在 disable_functions配置,默认配置中,cli执行函数都是被禁止的,如果需要的话,需要在php.ini中将 disable_functions = phpinfo,,exec , popen, system ….,将你需要执行的函数从列表中删掉再重启apache即可.
完全是配置的问题,linux中解决方法为编辑PHP配置文件:
vi /usr/local/php/etc/php.ini
寻找disable_functions字符串,将后面的scandir删除,提示:vi下可输入/,进入搜索模式,轻松找到disable_functions.
重启PHP生效:
复制代码 代码如下:
/etc/init.d/php-fpm restart
希望本文所述对大家的php程序设计有所帮助。

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

AI Hentai Generator
Generate AI Hentai for free.

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

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

In this chapter, we are going to learn the following topics related to routing ?

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Validator can be created by adding the following two lines in the controller.

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

Working with database in CakePHP is very easy. We will understand the CRUD (Create, Read, Update, Delete) operations in this chapter.
