S
S
step-olga2015-10-18 19:44:10
PHP
step-olga, 2015-10-18 19:44:10

How to disable quote checking in POST?

Transferred the site from the hosting to the local server. On all pages I accept a POST request like this:
$value = $_POST[value];
In the logs it says "PHP Notice: Use of undefined constant"
If you put a quote in $_POST[ ' value ' ], then everything is in order.
How can I disable the check of these quotes?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Igor Belikov, 2015-10-18
@step-olga

stackoverflow.com/questions/13622486/php-array-acc...

A
Aleksey Ratnikov, 2015-10-18
@mahoho

This behavior is described in the documentation: php.net/manual/ru/language.types.array.php#languag... And yes, you can't do that.

I
Ivanq, 2015-10-18
@Ivanq

No, of course!
It's done on purpose. What if you use __FILE__? And this is a constant. And instead of the expected "__FILE__" you will get "/usr/im_an_idiot/moy_servak/index.php"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question