Skip to content

Instantly share code, notes, and snippets.

View alex-gph1's full-sized avatar
💭
I may be slow to respond.

Alex G alex-gph1

💭
I may be slow to respond.
  • MedsGo
  • Manila
  • 07:43 (UTC +08:00)
View GitHub Profile
@alex-gph1
alex-gph1 / dev_smarty_cheatsheat.txt
Created November 8, 2024 19:11 — forked from dhaupin/dev_smarty_cheatsheat.txt
Smarty - Handy Snippets
## Grabbing a dispatch from CS-Cart
{if $smarty.request.dispatch == 'index.index'}
## Grabbing user group from CS-Cart
{$auth.usergroup_ids[2]}
## Admin user condition from CS-Cart
## $_SESSION prob isnt available, so $auth works instead
{if $auth.user_id && $auth.user_type == 'A'}
@alex-gph1
alex-gph1 / cscart.md
Created November 8, 2024 19:00 — forked from hightemp/cscart.md
CS Cart snippets

CS Cart snippets

Руководство по кодировке UTF-8 в PHP и MySQL

Файловые функции и UTF-8

В Unix и Linux (и, возможно, в OS X тоже) текущая Кодировка файловой системы задается параметром локали LC_CTYPE (см. функцию setlocale() http://php.net/manual/ru/function.setlocale.php). Например, он может иметь значение типа en_US.UTF-8, что означает кодировку UTF-8. Затем имена файлов и их пути могут быть созданы с помощью fopen() или получены с помощью dir() с этой кодировкой.

Кодировка PHP UTF-8 в php.ini-файле