我想停止与 php 一起使用的 linux 命令的错误。我怎样才能阻止这个错误?
我使用了error_reporting(0);
但未能阻止错误。
我的代码是这样的
`sudo touch $patch_detail_file`;
`sudo chmod 0777 -R $patch_detail_file`;
我的Apache2错误日志是这样的
chmod: cannot access 'Description/Tiguin-LBP-NetworkPrinter.description': No such file or directory
sh: 1: cannot create Description/Tiguin-LBP-NetworkPrinter.description: Directory nonexistent
touch: cannot touch '18092014/Description/Tiguin-Brother-MFCJ200.description': No such file or directory
最佳答案
通过 error_reporting,您只需禁用 php 在屏幕上或 PHP 错误日志中显示错误。您看到的是 Apache 网络服务器记录的错误消息。无法在运行时禁用它们。
关于php - 在 php for linux 命令中停止错误报告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34527386/