小编Dha*_*hit的帖子

codeigniter应用程序的Web Config文件

我正在遭受一个web配置文件,它不会重写我的codeigniter应用程序的url.这是web配置文件.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
    <rewrite>
        <rules>
            <rule name="Clean URL" stopProcessing="true">
                <match url=".*" />
                <conditions>
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                </conditions>
                <action type="Rewrite" url="index.php?{R:1}" appendQueryString="true" />
            </rule>
        </rules>
    </rewrite>
</system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)

这是我的网站:http: //gandhitomodi.com

我无法得到这种网址 http://gandhitomodi.com/controller/method/

例如

http://gandhitomodi.com/welcome/index/

请帮我解决这个问题.

****编辑*****

这是route.php

$route['default_controller']="welcome/index";
$route['sendmail']="welcome/send";
Run Code Online (Sandbox Code Playgroud)

这是我更改的config.php设置.

$config['base_url']="http://gandhitomodi.com/";
$config['index_page']='';
$config['url_protocal']='PATH_INFO';`
Run Code Online (Sandbox Code Playgroud)

php iis codeigniter web-config

11
推荐指数
2
解决办法
2572
查看次数

如何在Laravel中查找无效文本表示形式的列名称7整数的错误错误输入语法?

例如,我有一张桌子...

create table emp(  
  empno    integer,  
  ename    character varying(255),  
  job      character varying(255),  
  mgr      integer,  
  hiredate timestamp without time zone,  
  sal      double pricision,  
  comm     integer,  
  deptno   integer
)
Run Code Online (Sandbox Code Playgroud)

当我尝试插入数据时...

insert into emp (empno,ename,job,mgr,hiredate,sal,comm,deptno) values (1,'abc','abc','e','2018-10-12 00:00:00',50.50,1,'f');
Run Code Online (Sandbox Code Playgroud)

然后这给了我一个错误,invalid text representation 7 error invalid input syntax for integer因为我已经插入了字符串值,mgr并且deptno只能通过查看值才能找到它,但是PostgreSQL没有给我确切的列名,在该列名中遇到了这样的问题。有什么办法可以在错误消息本身中获取列名。因为当我们有超过50到60列时,要找到有问题的列是一个挑战。

postgresql laravel

4
推荐指数
1
解决办法
202
查看次数

Javascript动态数组影响$ .each循环

我动态创建了以下数组索引

var array=[];
array[4]=[];
array[6]=[];
array[100]=[];
Run Code Online (Sandbox Code Playgroud)

然后我试图在索引上添加一些数据

array[4].push({"id":3,"name":"dhaval"});
array[6].push({"id":6,"name":"harsh"});
array[100].push({"id":9,"name":"kevin"});
Run Code Online (Sandbox Code Playgroud)

然后,当我使用$ .each检索数据时,$ .each循环从0到100.

$.each(array,function(key,item){
    console.log(item);
});
Run Code Online (Sandbox Code Playgroud)

问题是我必须每次检查项目是否未定义,然后数据可能存在.那么循环的可能解决方案只有三次而不是100次.

输出:

4 undefined javascript_Each.html:23

[对象] javascript_Each.html:23

undefined javascript_Each.html:23

[对象] javascript_Each.html:23

93 undefined javascript_Each.html:23

[宾语]

html javascript arrays jquery

3
推荐指数
1
解决办法
521
查看次数

标签 统计

arrays ×1

codeigniter ×1

html ×1

iis ×1

javascript ×1

jquery ×1

laravel ×1

php ×1

postgresql ×1

web-config ×1