【发布时间】:2018-07-05 04:16:47
【问题描述】:
如何通过shell保存二进制内容?
我写了不工作的例子
$f = file_get_contents("my.exe");
exec("echo $f > new.exe");
【问题讨论】:
-
使用php函数打开一个新文件并将$f写入其中。 PHP 具有文件操作功能。 php.net/manual/en/function.fopen.php 和 php.net/manual/en/function.fwrite.php