exec() file_get_contents() file_put_contents() 示例
1.
<?php $abc = "chenshan"; exec("ls", $out); $tmp_out = json_encode($out); exec("echo $tmp_out > tmp2.txt"); file_put_contents(dirname(__FILE__) . "/tmp3.txt", $abc . " ", FILE_APPEND) ?>
2.
<?php $input = file_get_contents(dirname(__FILE__) . "/testinput.txt"); $input2 = str_replace("><", "> <", $input); file_put_contents(dirname(__FILE__) . "/tmp3.txt", $input2 . " ", FILE_APPEND); ?>
声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。