現在、ローカル マシンでコードをテストしており、所有しているテキスト ファイルを読み書きできるようにしたかったので、次のコードを作成しました。
Warning: file_get_contents(~/Desktop/insta_user.txt): failed to open stream: No such file or directory in /Users/Brad/Sites/App/src/App/MainBundle/Controller/InstaController.php on line 33
私が持っているコードは次のとおりです。
$file = '~/Desktop/insta_user.txt';
$current = file_get_contents($file, FILE_USE_INCLUDE_PATH);
このファイルは既にデスクトップに存在しますが、このファイルにローカルで書き込む方法を知りたいと思っています。