错误,php.ini中的register_globals被禁用,请启用它! [英] error,register_globals is disabled in php.ini, please enable it!

查看:509
本文介绍了错误,php.ini中的register_globals被禁用,请启用它!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi thiis是vijayadurga,我是PHP的初学者,我下载了一个php文件,但是我把它放到wampserver中,出现错误,错误是" register_globals在php.ini中被禁用,请启用它!"
请提供解决方案如何解决此问题.

hi thiis is vijayadurga, I am a beginner of PHP,I downloaded one php file,but i put it wampserver, i got an error, The error is "register_globals is disabled in php.ini, please enable it!"
Please give solution how to solve this problem

推荐答案

如果我们不使用register_globals,这是一种更好的做法.如果您尝试避免此错误,则必须进行很多更改.尽管您是新手,这意味着您正在学习.我建议您从php代码中删除该行.

现在它是做什么的:
假设您有一个来自两个输入字段名称和年龄的from.当您提交并且如果调用register_globals函数时,您的php将创建两个变量名称:
It is a way better practice if we use do not use register_globals. If you try to avoid this error you will have to go through lots of change. though you are beginner which mean you are learning. I would suggest you to remove the line from your php code.

now what does it do:
Say you have a from with two input field name and age. when you submit and if your register_globals function is called your php will create two variable name:


name,


age并将从表格栏位.例如:

age and will set the value from the form field. example:

<form method="get">
<input name="name">
<input name="age">
<input type="submit">
</input></input></input></form>



您还将获得一个变量名



you will also get a variable name


这篇关于错误,php.ini中的register_globals被禁用,请启用它!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆