gpt4 book ai didi

javascript - JQuery 文件输入在本地有效,但在远程服务器上无效

转载 作者:行者123 更新时间:2023-11-28 03:35:56 25 4
gpt4 key购买 nike

我知道这是一个愚蠢的问题,但我的 JQuery 文件输入在本地运行得很好,但在 abc.com 托管服务器上它根本不起作用。

这是我的脚本链接:

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" type="text/javascript"></script>

<link href="<?=base_url()?>http://mcitms.com/spshrm/public/dist/file/css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="<?=base_url()?>http://mcitms.com/spshrm/public/dist/file/js/fileinput.js" type="text/javascript"></script>
<script src="<?=base_url()?>http://mcitms.com/spshrm/public/dist/file/js/fileinput.min.js" type="text/javascript"></script>

希望将一些 pdf 文件上传到托管服务器。任何人都可以帮我解决我的错误吗?

htaccess 文件

#htaccess Override the URL
<IfModule mod_env.c>
SetEnv CI_ENV development
# SetEnv CI_ENV production
</IfModule>
RewriteEngine on
RewriteBase /spshrm
# Prevent CI index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
# Prevent user access to the CI system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
# Prevent user access to the CI application folder
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

最佳答案

尝试在脚本标记中添加您的网站

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" type="text/javascript"></script>

<link href="http://mcitms.com/spshrm/public/dist/file/css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src=http://mcitms.com/spshrm/public/dist/file/js/fileinput.js" type="text/javascript"></script>
<script src="http://mcitms.com/spshrm/public/dist/file/js/fileinput.min.js" type="text/javascript"></script>

http://yoursite.com/更改为您的当前网站

应该像上面这样

还要检查您的上传文件夹是否在网站上创建,并检查其文件夹权限,将权限更改为不低于775

以下是可能的数字及其代表的权限的完整表格:

1 --x execute 
2 -w- write
3 -wx write and execute
4 r-- read
5 r-x read and execute
6 rw- read and write
7 rwx read, write and execute

chmod 将您的上传文件夹更改为至少 775

关于javascript - JQuery 文件输入在本地有效,但在远程服务器上无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57743322/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com