Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/291.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
Php url之前的页面/更改url_Php_Codeigniter_Url - Fatal编程技术网

Php url之前的页面/更改url

Php url之前的页面/更改url,php,codeigniter,url,Php,Codeigniter,Url,我创建了一个登录网站,我的URL变成这样 http://localhost/koperasi/index.php/cukl/index 如何使我的网址像 http://localhost/koperasi/index.php/cukl 因为我想做一个crud程序,但我想我的url有问题 ** 使用http://localhost/lee/index.php/buku这样我的页面就可以在http://localhost/lee/index.php/buku/ubah 但是现在我的新程序u

我创建了一个登录网站,我的URL变成这样

http://localhost/koperasi/index.php/cukl/index

如何使我的网址像

http://localhost/koperasi/index.php/cukl


因为我想做一个crud程序,但我想我的url有问题


**
使用
http://localhost/lee/index.php/buku

这样我的页面就可以在
http://localhost/lee/index.php/buku/ubah


但是现在我的新程序url是
http://localhost/koperasi/index.php/cukl/index



如何以及在何处更改url?在控制器中吗?模型或者查看?

我认为,首先您必须添加一个htaccess文件,该文件将删除URL中的index.php

在route.php文件中,您可以定义所需的新URL

像这样

$route['cukl'] = 'cukl/index';

尝试查看.htaccess URL重写。