php file_uploads disabled on server, workaround?
I am working on a project and I am using my universities server. However, file_uploads is disabled in php.info and I cannot do anything about it. Therefore I cannot use the normal way up uploading files through html.
I was thinking of reading the contents of the file, transferring the text to the server and writing to a file there. My problem, however, is that I do not know how to do开发者_开发技巧 this. I need to open a file dialog and the read the content of the file.
I can use a combination of html, php and javascript (I am not very well traversed in the latter). Do you guys have any suggestion?
My last escape would be to write my client in flash and as3, but I want to avoid this if possible as flash is kind of looked down upon here.
Do you have access to a cgi-bin directory or the capability to mark scripts as CGI? You could write the upload handling script in another language (shell script, Perl, etc...) and have that handle the upload, bypassing the PHP restriction.
However, since you say it's just a text file, you could bypass the problem by simply cutting/pasting the file's contents into a <textarea>
and submit the form normally. It'd effectively be a file upload, without ever doing a file upload.
精彩评论