When you use a <input type="file" /> for file uploads is there anyway to get the text that is written inside the box for example C:\Documents and Settings\Matthew\Desktop\Images\image.png?
You need to use the GD extension in PHP in order to write text into an image. http://www.php.net/manual/en/book.image.php
That is completely unrelated to what I am talking about... You know the <input type="file" /> when you are uploading files? I want to get the text that is in there like the C:\...
It's all a matter of how you word your question, since 'box' could be misinterpreted as trying to say trying to get text into an image, or out of an image, and not 'original file name'. Though $_FILES['userfile']['name'] will only contain the name of the file as uploaded it won't contain the full path of the local file system it was selected from. (meaning filename.png, not C:\...\...\filename.png)
php wont allow you to do this i guess i mean if u use the function it will be done directly using the tmp_name
When I use filesize($_FILES['upload']['name']); why does it not find out the file is too big before it uploads it.
I Found this on dp http://digitarald.de/project/fancyupload/ uses mootools and a really tiny flash control - check the demos. achieves desired check and much more, including progress report, multiple uploads etc. flash is likely to be installed for at least 90% of your visitors and the solution is semantic anyway - uses a normal form upload which can work via POST if flash is not there. Source http://forums.digitalpoint.com/showpost.php?p=10220969&postcount=9
Javascript and VBScript for security reasons are not allowed to access the file system in that manner. So you're stuck with Java (not javascript), Flash or ActiveX for client-side file access. (You wouldn't want to use VBScript or ActiveX anyways since that would only work for Windows, and specifically Internet Explorer)
Course could be like youtube and all the other social sites, offering the flash uploader as the default but a legacy version available as well (but in big bold telling you can't upload a file bigger than such and such, but the whole thing would still need to be uploaded before it could bite back).
Because I thought you could use filesize(C:\) to find out the size of the file before you uploaded it.
Naturally a serversided language has no direct access to the client's file system, it would otherwise be extremely insecure. I wouldn't get too annoyed, even the big boys like youtube and microsoft have to resort to either flash or activeX controls to do what you wanted to do without using those items.
Your only two options are Flash or Java (not javascript, but an actual Java applet which works pretty much like Flash does) if you want to support anything other than Internet Explorer.