当我尝试读取txt文件的内容时,我不断收到此错误:
index.php文件:
<?php
$handle = fopen ("php://stdin","r");
$line = fgets($handle);
fwrite(STDOUT, "Welcome $handle");
?>
Run Code Online (Sandbox Code Playgroud)
在命令行中我做: cat texte.txt | php index.php
其中texte.txt包含一个名称.两个文件txt和php在同一个文件夹中.我曾经工作得很好,我不知道为什么这个错误出现在我的情况下.
| 归档时间: |
|
| 查看次数: |
1190 次 |
| 最近记录: |