javascript - JQuery 文件输入在本地工作,但不在远程服务器上
问题描述
我知道这是一个愚蠢的问题,但我的 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]
解决方案
去
your_project/application/config/config.php
文件并将您的base_url
从更改localhost
为abc.com
推荐阅读
- javascript - prev 和 next 在分页中返回未定义的页码
- reactjs - 如何使用 Typescript 向 state 添加新值?
- ios - 将本机 html 反应为 pdf
- apache-nifi - 如何将外部 jar 添加到 nifi 集群?
- r - 付费计划闪亮:错误 - “应用程序无法启动:正常退出,代码 137,信号 9 (SIGKILL)”
- sql-server - 跳过或运行由变量 T-SQL 确定的代码行
- kubernetes - Prometheus 从 GKE 中的 kubernetes api 获得 403 禁止
- r - 将闪亮的应用程序包装在一个包中
- android - Firebase 实时数据库 - 如何将来自多个活动的数据存储在同一个子元素下?
- filenet-process-engine - FileNet 工作流 - 将 F_Subject 设置为初始附件的名称