7

I wanted to know the way to disable a function from usage in PHP.

Thanks

user318466
  • 403
  • 1
  • 5
  • 9
  • possible duplication of http://stackoverflow.com/questions/1865020/php-how-to-disable-dangerous-functions – MAS1 Apr 19 '10 at 06:10

3 Answers3

20

In the php.ini configuration file, you can use the disable_functions parameter. For example, to disable the symlink() and system() functions, you would use:

disable_functions = "symlink,system"
Dumb Guy
  • 3,336
  • 21
  • 23
0

If you can give me more details, like what you are trying to do maybe we can provide a better solution. To answer your query if you want to disable a function this should do:

override_function('test', '', '');

this will override function test with a function that does nothing.

Luis
  • 5,979
  • 2
  • 31
  • 51
0

you may try to override that function to do nothing

http://php.net/manual/en/function.override-function.php