首页 > 解决方案 > 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]

标签: javascriptcodeigniter

解决方案


your_project/application/config/config.php

文件并将您的base_url从更改localhostabc.com


推荐阅读