[resolved] Notice: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’

In this post we will show you solution or how to resolve Notice of Notice: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’, hear for Notice Notice: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’ we will give you for how to resolve Notice.

[solved]Notice: Use of undefined constant REQUEST_URI - assumed 'REQUEST_URI'
[solved]Notice: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’

Notice: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’

you run this code and

echo $_SERVER[REQUEST_URI];

it will give you this error Notice: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’

solution for Notice: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI

for resolve this Notice you need to implement this code.

$_SERVER['REQUEST_URI']

OR

$_SERVER["REQUEST_URI"]

$_SERVER[REQUEST_URI] is syntatically inaccurate and AFAIK won’t keep running on a default establishment of PHP5. The exhibit record is a string so it should be passed on strings. PHP4 changed over vague constants to strings inside the square sections yet it’s as yet not great practice.

EDIT: Well unless you characterize a steady called REQUEST_URI, which you haven’t in your illustration script.

$_SERVER['REQUEST_URI']

is the standard technique and what you ought to be utilizing.

$_SERVER["REQUEST_URI"]

likewise works and keeping in mind that not wrong is marginally more work for the PHP mediator so unless you have to parse it for factors ought not be utilized. (what’s more, in the event that you have to do as such, you have to reconsider that piece of your program.

Hope this code and post will helped you for how to resolve Notice Notice: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve onlincode. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs onlincode.org