Настройка корректного вывода кириллицы в Delphi for php
К сожалению, по умолчанию Delphi for php выводит кириллицу не корректно. Я, например, применяю в проектах UTF-8, но вместо русских букв получается абракадабра. Чтоб всё заработало корректно следует несколько настроить Apache, PHP, а возможно понадобится и .htaccess прописать. После несколько затяжной борьбы с Delphi for PHP мне удалось получить конфигурации, котрые работают коррректно и локально и на сервере. Итак, чтоб у Вас заработала кириллица, необходимо сделать правки в Apache. (Правки в основном везде связаны с таблицей кодировок по умолчанию) Заходим в каталог \apache2\conf, который находится внутри каталога Delphi for PHP. И правим файлы: httpd.conf, httpd.default.conf, httpd.template.conf так, чтоб получилось нечто похожее на: # # Based upon the NCSA server configuration files originally by Rob McCool. # # This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions. # See for detailed information about # the directives. # # Do NOT simply read the instructions in here without understanding # what they do. They’re here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # The configuration directives are grouped into three basic sections: # 1. Directives that control the operation of the Apache server process as a # whole (the ‘global environment’). # 2. Directives that define the parameters of the ‘main’ or ‘default’ server, # which responds to requests that aren’t handled by a virtual host. # These directives also provide default values for the settings # of all […]
Read more