0
echo "Enter file path:";
$filePathV2C = fgets(STDIN);
$fileString=file_get_contents($filePathV2C);
print $fileString;
입력는 "C :/phpfile이라고/myfile을 같이 입력을 제공함으로써오류 사용 file_get_contents() PHP에서 내가 제공
Warning: file_get_contents(file://C:/php/myfile.v2c ): failed to open stream: Invalid argument in C:\php_CloudWSsample\Sample.php
프로토콜없이 시도하십시오. 'file : //' – Justinas
시도했지만 여전히 작동하지 않습니다. 파일 이름을 file_get_contents에 직접 입력하면 file_get_contents ("c : \ php \ myfile.v2c")와 같이 작동합니다. 하지만 변수 이름으로는 작동하지 않습니다. –