When we try to open a blank text file ( 0kb ) using window.open() in php we get an error that the file not exist. But when we open it directly by giving that path to a browser it will open that blank file.
Please help... Thnks.
When we try to open a blank text file ( 0kb ) using window.open() in php we get an error that the file not exist. But when we open it directly by giving that path to a browser it will open that blank file.
Please help... Thnks.
With PHP you have to use fopen with 'a','a+','w' or 'w+' to avoid error if file doesn't exist. With JavaScript you can use the FileReader API but it's not implemented on all browsers : http://www.html5rocks.com/tutorials/file/dndfiles/