我想用SED将php.ini文件中的文本disable_functions =
替换为:disable_functions = show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open, ini_set
。
这是我的SH代码:
sed -i /disable_functions =/disable_functions = show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open, ini_set/g' /usr/local/lib/php.ini
如果我执行.SH脚本,我不知道为什么它不起作用。有人能帮我吗?
如果您的行中缺少搜索's
标记,请使用以下内容:
sed -i 's/disable_functions =/disable_functions = show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open, ini_set/g' /usr/local/lib/php.ini