警告:出于安全原因,已禁用shell_exec() [英] Warning: shell_exec() has been disabled for security reasons
本文介绍了警告:出于安全原因,已禁用shell_exec()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在这段代码上收到此错误:
i am getting this error on this code:
$folder = $_SERVER['DOCUMENT_ROOT'].'/projects/charli/dashboard/';
$folder = escapeshellcmd($folder);
if( ! is_dir($folder) )
{
echo "$folder is not a folder.<br />";
}
else
{
$output = `du -s $folder`;
if( preg_match('/([0-9]+)(\t.*)/',$output,$match) )
{
$size = $match[1];
echo "Folder $folder is $size bytes<br />";
}
else
{
echo "Error fetching folder size, are you on Linux? and can you execute commands?<br />";
}
}
错误:
警告:shell_exec( )出于安全原因被禁用
任何人?
error:
Warning: shell_exec() has been disabled for security reasons
anyone?
推荐答案
文件夹 =
folder =
_SERVER [' DOCUMENT_ROOT']。 ' / projects / charli / dashboard /';
_SERVER['DOCUMENT_ROOT'].'/projects/charli/dashboard/';
文件夹 = escapeshellcmd(
folder = escapeshellcmd(
这篇关于警告:出于安全原因,已禁用shell_exec()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文