dongwaner1367 2017-04-16 22:07
浏览 45

php 在制作脚本表格后不起作用[复制]

This question already has an answer here:

So i made a shell script to make a file for me then i decided it would be nice if others could use the script so i transfered the script to a php code and tried it out and it worked! (amazingly, first time really doing php.) i spent almost a day learning about how to make a form for this and then a few hours learning how to make everything correctly write to a file, i made it output to a file before making it a full form and everything worked perfectly, then i made it into a form and now the function doesnt work. i did some searching and it seems the majority of people use and have a problem, are confusing it with html's
but this is being written to a file and isnt html. below is the problem code.

while($x <= $plots){
$txt = "echo starting plot $x/$plots on drive $Drive
";
fwrite($myfile, $txt);
$txt =  "gpuplotgenerator generate $Style $Drive$Semi/Burst/plots/$ID$US$StartNonce$US$PlotSize$US$Ram
";
fwrite($myfile, $txt);
    $x++;
$StartNonce=$StartNonce+$PlotSize+1;

if you need the full script here it is: https://pastebin.com/eb1cMys7

</div>
  • 写回答

1条回答 默认 最新

  • dtjw6660 2017-04-16 22:25
    关注

    Use the global define PHP_EOL instead of manually writing a carriage return linebreak (It's generally better to use the resources given to you, then remaking them yourself and potentially encountering a problem with it later).

    评论

报告相同问题?

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大