Issue
I'm using a web server with PHP on my android device, and it works great. I have a form that ultimately ends up in a file after I write it with file_put_contents.
The thing is that if I use a file manager on the device, I can see the file, but not if I try to access it in Windows explorer using a USB cable to the device. And if I copy the file in said file manager to the same folder, but to another name, I can see the file using a USB cable in Windows explorer.
I would like a smooth way of accessing this file from a Windows PC without using SSH servers (which works. If i ssh to the device I can see it and copy it) or using a file manager on my Android device to copy it to my PC (which also works since I can just set some folder shared in Windows).
All files should have atleast read-rights on them, and they're being written in a folder that's on the sdcard on the device (hence its a fat-system = not chmoddable?). The device isn't rooted, and I'd like if it stayed that way (but it might actually be this I need to do to fix it?)
If I list the files it says that all file owners are root, even if its a file that's been created in Windows and copied to my document root with Windows explorer (those files are always visible by Windows explorer, it's just the files created by file_put_contents that doesn't show up). If I try the exact same code on an Windows apache server the files shows up right as they're supposed to be.
Hope I made myself clear, and I hope someone can point me in the right direction! :-)
Solution
So the problem had nothing to do with my code, but rather the case of the "you have to restart your device to show your files in explorer"-syndrom. I'm not sure what exactly is going on, but that's a heads up anyway...
Answered By - user2724415 Answer Checked By - Mary Flores (WPSolving Volunteer)