echo "Enter file path:";
$filePathV2C = fgets(STDIN);
$fileString=file_get_contents($filePathV2C);
print $fileString;
我提供的输入是:c:\phpFile\myfile.v2c
但我得到以下错误:
警告:file_get_contents(file:// C:/php/myfile.v2c ):无法打开流:C:\ php_CloudWSsample \ Sample.php中的参数无效
答案 0 :(得分:0)
尝试输入:" c:/phpFile/myfile.v2c"