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? 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? 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 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 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>"; } 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
Archived
This topic is now archived and is closed to further replies.