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
.html在使用ajax的codeigniter中无法正常工作_Ajax_Codeigniter_Url - Fatal编程技术网

.html在使用ajax的codeigniter中无法正常工作

.html在使用ajax的codeigniter中无法正常工作,ajax,codeigniter,url,Ajax,Codeigniter,Url,我想对我网站上的所有页面使用.html。我的网站在codeigniter中,所以我更改了config.php文件中的以下行 $config['url_suffix'] = '.html'; 在页面上,它工作正常,但在ajax的情况下,它不工作。此外,在某些情况下,我将文件重新定位到controller_name/value。在这些情况下,它变得像controller_name.html/value 如何正确和完美地使用.html请帮助,因为我的客户需要.html格式 提前感谢 如果使用“.ht

我想对我网站上的所有页面使用.html。我的网站在codeigniter中,所以我更改了config.php文件中的以下行

$config['url_suffix'] = '.html';
在页面上,它工作正常,但在ajax的情况下,它不工作。此外,在某些情况下,我将文件重新定位到controller_name/value。在这些情况下,它变得像controller_name.html/value

如何正确和完美地使用.html请帮助,因为我的客户需要.html格式


提前感谢

如果使用“.html”后缀(或任何后缀),则应在中生成以下类型的URL:

  • controller.html
  • controller/var.html
  • controller/var/other.html
试试看,应该可以使用Ajax