Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we set "allow_url_fopen" "ON" by using the ini_set() function in php [duplicate]

Tags:

php

Can we set "allow_url_fopen" "ON" by using ini_set() function in php

like image 649
jsduniya Avatar asked Jul 10 '13 14:07

jsduniya


People also ask

What is the use of Ini_set () in PHP?

The ini_set() function allows you to change system attributes that affect the way your script is executed. Changes only affect the current script, and will revert back when the script ends. To use ini_set() , pass it the value you want to change as its first parameter, and the new value to use as its second parameter.

What is Allow_url_fopen?

allow_url_fopen can be used to retrieve data from remote servers or websites. However, if incorrectly used, this function can compromise the security of your site.

What is the directive that is used to enable disable file uploading in the PHP ini file?

PHP disable_functions directive You can disable specific PHP functions by using the disable_functions directive in a custom php. ini file.


2 Answers

you can't, "allow_url_fopen" has the changable mode PHP_INI_SYSTEM

Entry can be set in php.ini or httpd.conf

and not by ini_set()

http://www.php.net/manual/en/configuration.changes.modes.php

like image 143
Alex Stallen Avatar answered Sep 22 '22 23:09

Alex Stallen


You can't

allow_url_fopen can only be modified from an ini file or httpd.conf.

like image 27
AD7six Avatar answered Sep 20 '22 23:09

AD7six