csckid Posted July 2, 2010 Share Posted July 2, 2010 $mybyte[]=$_POST['myfilebyte']; $filem = file($mybyte); Is there any command that will convert byte into file? Thanks Link to comment https://forums.phpfreaks.com/topic/206497-convert-array-into-file/ Share on other sites More sharing options...
gevik Posted July 2, 2010 Share Posted July 2, 2010 I think you have to save your byte stream to a temporary file first. Link to comment https://forums.phpfreaks.com/topic/206497-convert-array-into-file/#findComment-1080235 Share on other sites More sharing options...
AbraCadaver Posted July 2, 2010 Share Posted July 2, 2010 It's hard to tell what you're doing, but file() reads a file, plus you are assigning the data to an array first. Try: $mybyte = $_POST['myfilebyte']; file_put_contents('/path/to/file', $mybyte); Link to comment https://forums.phpfreaks.com/topic/206497-convert-array-into-file/#findComment-1080374 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.