Home > php教程 > php手册 > body text

PHP framework CodeIgniter connection MS Sqlserver2014 and URL Rewrite problem solving

WBOY
Release: 2016-08-15 16:49:41
Original
1025 people have browsed it

I recently learned the CodeIgniter framework and encountered some problems. I recorded them so that I can review them later.

I want to try connecting to the database. Since I am a windows system and MS Sqlserver2014 is also installed on this machine, it is logical to think of using CI to connect to Sql Server.

PHP 5.6 version does not have the default dll to connect to SQL server. You need to download "Microsoft Drivers for PHP for SQL Server" from Microsoft's official website. However, this can only run normally in win32-bit systems.

Since my system is 64-bit, I modified the configuration of php.ini according to what is said on the Internet, but I still get the error "Can not find undifined function sqlsvr_conncet()". Although I saw it online

The article also mentioned this driver problem, but I never paid attention to it. After two days of struggling, I had no choice but to download the unofficial 64-bit driver from CSDN. The result turned out to be miraculously better. Hey, I think it’s still

I trust Microsoft so much that I don’t even pay enough attention to this small bug. How many beginners must be allowed to jump into the pit?

In addition, CI wants to remove index.php from the URL. According to the official documentation, change $config['index_page'] = 'index.php'; in Applicationconfigconfig.php to

$config['index_page'] = '';Then modify the httpd.conf file of Apache Server. Remove the comment before the Rewrite module. Then create a new .htaccess file in the application root directory,

Enable rewriteengine. But after I tested it according to the method, it didn't work.

Later, I searched the Internet for articles on Baidu Zhizhili. "How to remove index.php from URL in CodeIgniter framework", according to this article, you need to add a Directory node in httpd.conf. The node information is as follows:

Options Indexes FollowSymLinks

AllowOverride All

Order allow,deny

Allow from all

Then restart Apache and that’s it.

I hope this article can help friends who have the same problems as me.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template