Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Codeigniter 代码点火器和表单_Codeigniter_Codeigniter Url - Fatal编程技术网

Codeigniter 代码点火器和表单

Codeigniter 代码点火器和表单,codeigniter,codeigniter-url,Codeigniter,Codeigniter Url,我与Codeigniter和我的主机提供商有问题 我用函数form_open(“welcome/index”)创建了一个表单,它生成了这个html代码 但这不起作用,事实上,当我提交表单时,我将在同一页中返回而不产生任何效果 我必须说,代码中没有错误,因为它在localhost中工作,如果我编写form_open()http://gggg.com/index2.php/welcome/index) 总之,如果我写下: form\u open('welcome/index'),它不起作用 否则,

我与Codeigniter和我的主机提供商有问题

我用函数form_open(“welcome/index”)创建了一个表单,它生成了这个html代码
但这不起作用,事实上,当我提交表单时,我将在同一页中返回而不产生任何效果

我必须说,代码中没有错误,因为它在localhost中工作,如果我编写
form_open()http://gggg.com/index2.php/welcome/index)

总之,如果我写下:
form\u open('welcome/index')
,它不起作用 否则,如果我写:
form_open('http://gggg.com/index2.php/welcome/index)
,它可以工作


这很奇怪,有人能帮我吗?

知道表单数据实际发送到哪个URL会有所帮助

您需要查看配置文件。确保为以下各项设置了正确的值:

$config['base_url'] = "http://gggg.com/";
$config['index_page'] = "index2.php";
如果您在Apache上运行,请确保htaccess文件正确。

如果您不喜欢,则应始终添加'index2.php'和所有URL的开头

尝试使用
form\u open('index2.php/welcome/index')
进行修改


无论如何,请按照Michael告诉您的方式检查config.php文件。

谢谢您的回答,但我已经多次检查了这些变量,这些都是正确的。正如我之前所说的,它在localhost中工作……我已经尝试使用echo form_open('index2.php/welcome/index');它不工作,因为它创建了这个url:这似乎是托管提供商的问题?在这种情况下,我的主机是由arubaI更新到2.0版