简体   繁体   English

在Handler文件上传之前从文件名中删除撇号

[英]Remove apostrophes from filename before the Handler file upload it

Due to some issues with my hosting server supporting apostrophes, I need to remove them from the file o files before they are uploaded. 由于我的托管服务器支持撇号的一些问题,我需要在上传之前将它们从文件o文件中删除。

I'm using the JQuery Upload File script, and this is the link to the UploadHandler script file I need to modify, but I need a little help doing it so. 我正在使用JQuery上传文件脚本,这是我需要修改的UploadHandler脚本文件的链接,但我需要一点帮助。 Can someone please tell me what I need to change in this script in order to remove those apostrophes before they are processed? 有人可以告诉我在这个脚本中需要更改的内容,以便在处理之前删除这些撇号吗?

UploadHandler.php UploadHandler.php

https://github.com/blueimp/jQuery-File-Upload/blob/master/server/php/UploadHandler.php https://github.com/blueimp/jQuery-File-Upload/blob/master/server/php/UploadHandler.php

Please Help. 请帮忙。

You should just be able to add to the function trim_file_name() . 您应该只能添加到函数trim_file_name()

Add this to a new line after line #455 在第455行之后将其添加到新行

$name = str_replace("'", "", $name);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM