Survey and voting software

Source: Internet
Author: User
Tags apache php mysql code php mysql limesurvey

I recently looked for the voting software to find limesurvey and phpquestionnaire. limesurvey can be used in Chinese, but it is cumbersome. Phpquestionnaire downloaded a Chinese package, but after the installation, it was found that there are still various problems in Table creation, which is actually caused by the Apache PHP MySQL code. I checked it online, after modification, the table is displayed normally and created. Let's sum up a few points to avoid some detours.
1. MySQL has database-level encoding and table-level (column-level ?) Encoding: in Windows, it is best to use utf8. if you are using a previously created library instance, you 'd better see what encoding is. If the problem persists, specify it when creating the table.
$ Tablequery [] = array ("phpqadmin", "create table phpqadmin (phpqid bigint unsigned not null, version char (10) Not null, passwd varchar (20) not null, template varchar (50) not null, language varchar (50) not null, adminlanguage varchar (50) not null, summarylimit int unsigned not null default 10, textarealimit int unsigned not null default 5, popuplimit int unsigned not null default 5, advanceinterface Enum ('y', 'n') not null default 'n', listsurvey Enum ('y', 'n ') not null default 'y', timeout bigint unsigned not null, cookiedomain varchar (255) not null)Default Character Set utf8 collate utf8_unicode_ci");

2. mySQL also has the so-called client encoding, which is the encoding that MySQL considers to be used for data retrieval. For example, it is best to use UTF-8 to return data encoding when Apache PHP retrieves data.
If the problem persists, simply add mysql_query ("set names 'utf8'", $ conn) to the MySQL connection configuration );

3. After this change, some files will be saved in UTF.

4. do not specify the encoding for httpd. conf PHP. ini.

5. In the template file, directly change to <meta HTTP-EQUIV = "Content-Type" content = "text/html; charset = UTF-8">

In this way, the table creation is normal.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.