This example describes the PHP disabling function settings and viewing methods. Share to everyone for your reference, specific as follows:
Open PHP.ini and find this line:
Disable_functions =
Add the function you want to disable in the back, such as disabling multiple functions, using a half-width comma to separate
Give an example:
Copy Code code as follows:
Disable_functions = Passthru,exec,system,popen,chroot,scandir,chgrp,chown,escapesh
Ellcmd,escapeshellarg,shell_exec,proc_open,proc_get_status
Recommended functions that are disabled on the host:
Copy Code code as follows:
Disable_functions = System,exec,shell_exec,passthru,proc_open,proc_close, PROC_GET_STATUS,CHECKDNSRR,GETMXRR, Getservbyname,getservbyport, Syslog,popen,show_source,highlight_file,dl,socket_listen,socket_create,socket_bind , Socket_accept, Socket_connect, Stream_socket_server, Stream_socket_accept,stream_socket_client,ftp_connect, FTP_ Login,ftp_pasv,ftp_get,sys_getloadavg,disk_total_space, Disk_free_space,posix_ctermid,posix_get_last_error, POSIX_GETCWD, Posix_getegid,posix_geteuid,posix_getgid, Posix_getgrgid,posix_getgrnam,posix_getgroups,posix_ Getlogin,posix_getpgid,posix_getpgrp,posix_getpid, Posix_getppid,posix_getpwnam,posix_getpwuid, Posix_getrlimit, Posix_getsid,posix_getuid,posix_isatty, Posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, Posix_ Setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname
On the host how to view the list of disabled functions, I found a very good probe from the internet
<?php header ("content-type:text/html;
Charset=utf-8 ");
Header ("Cache-control:no-cache, must-revalidate");
Header ("Pragma:no-cache");
error_reporting (0); Ob_end_flush ();?> <! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
More about PHP Interested readers can view the site topics: "PHP Design Security Course", "PHP object-oriented Program Design Introductory Course", "PHP Mathematical Calculation Skills Summary", "PHP Array" Operation Techniques Encyclopedia, "PHP string (String) Usage summary, "PHP Data structure and algorithm tutorial", "PHP Programming algorithm Summary" and "PHP common database Operation skill Summary"
I hope this article will help you with the PHP program design.