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.