Getting ’ instead of an apostrophe(') in PHP

前端 未结 14 1015
慢半拍i
慢半拍i 2020-11-27 02:38

I\'ve tried converting the text to or from utf8, which didn\'t seem to help.

I\'m getting:

\"It’s Getting the Best of Me\"

It sho

14条回答
  •  猫巷女王i
    2020-11-27 03:19

    If you're here because you're experiencing issues with junk characters in your WordPress site, try this:

    1. Open wp-config.php

    2. Comment out define('DB_CHARSET', 'utf8') and define('DB_COLLATE', '')

      /** MySQL hostname */
      define('DB_HOST', 'localhost');
      
      /** Database Charset to use in creating database tables. */
      //define('DB_CHARSET', 'utf8');
      
      /** The Database Collate type. Don't change this if in doubt. */
      //define('DB_COLLATE', '');
      

提交回复
热议问题