我有一些内容要写入名为bk_strategy-ptr-to-real-file.h
的文件。这是代码:
echo $content = $header.$parameters.$footer;
$myFile = "/home/vikas/hft/common/internal/config/trader/master/bk_strategy-ptr-to-real-file.h";
$fh = fopen($myFile, 'w') or die("can't open file");
fwrite($fh, $content);
fclose($fh);
是否可以使用xml rpc编写文件?
答案 0 :(得分:0)
您不使用xml-rpc写入文件,它是一种通信协议。您使用您的php或asp来编写文件。你有什么是好的:
$myFile = "/home/vikas/hft/common/internal/config/trader/master/bk_strategy-ptr-to-real-file.h";
$fh = fopen($myFile, 'w') or die("can't open file");
fwrite($fh, $content);
fclose($fh);
但是为什么文件是.h扩展名,如果它不是.xml,或者可能是.txt或.php,这取决于你接下来要对响应做什么。