0
我使用PHP函数用了shell_exec ls命令:如何从shell_exec返回空白空间?
shell_exec('ls');
的回报是:
index.php index.php~ ajaxF.php ajaxF.php~ ajaxL.php ajaxL.php~ ajax.php
我注意到每个文件之间的空间,我试图改变它,但它失败(” A'它只是一个随机字符,实际上我想添加一些html):
preg_replace('/ /', "A", $output);
preg_replace('/<br>/', "A", $output);
preg_replace('/\n/', "A", $output);
如何用其他字符替换此空白空间? 这个的意思是为每一行添加html数据。
是否可以分割数组中的每一行?
顺便说一句,我使用的是Ubuntu。
谢谢!
谢谢!比我期待的更好! – Bagata