plznty Posted December 29, 2008 Share Posted December 29, 2008 if ( $_GET['process'] == edit ) { $data = file_get_contents("./web/$_COOKIE[user]/$GET_[file].txt"); echo " <b>$welcome's Webpage Editor</b> <p>You are editing: $_GET[file]</p> <p><form action='editor.php?process=submit&file=$_GET[file]' method=post><textarea name='data' cols='40' rows='10'>$data</textarea> <p><input type=submit value=Login></p> </form>"; } I want the $data information into the textarea, help please? Quote Link to comment https://forums.phpfreaks.com/topic/138761-solved-file-get-contents-issue/ Share on other sites More sharing options...
gevans Posted December 29, 2008 Share Posted December 29, 2008 and whats the problem? Quote Link to comment https://forums.phpfreaks.com/topic/138761-solved-file-get-contents-issue/#findComment-725527 Share on other sites More sharing options...
plznty Posted December 29, 2008 Author Share Posted December 29, 2008 Warning: file_get_contents(./web/ryan/.txt) [function.file-get-contents]: failed to open stream: No such file or directory in C:\xampp\htdocs\web\admin\editor.php on line 47 Quote Link to comment https://forums.phpfreaks.com/topic/138761-solved-file-get-contents-issue/#findComment-725532 Share on other sites More sharing options...
MatthewJ Posted December 29, 2008 Share Posted December 29, 2008 Take a look at your error... It is telling you there is no file named ".txt" You have no name on the file, just the extension Quote Link to comment https://forums.phpfreaks.com/topic/138761-solved-file-get-contents-issue/#findComment-725534 Share on other sites More sharing options...
gevans Posted December 29, 2008 Share Posted December 29, 2008 if ( $_GET['process'] == edit ) { $data = file_get_contents("./web/$_COOKIE[user]/{$GET_['file']}.txt"); echo " <b>$welcome's Webpage Editor</b> <p>You are editing: $_GET[file]</p> <p><form action='editor.php?process=submit&file={$_GET['file']}' method=post><textarea name='data' cols='40' rows='10'>$data</textarea> <p><input type=submit value=Login></p> </form>"; } Quote Link to comment https://forums.phpfreaks.com/topic/138761-solved-file-get-contents-issue/#findComment-725537 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.