Re: net2ftp (FreeBSD7.1 and apache22)
Добавлено: 2013-02-26 8:15:13
и можно ли пофиксить уведомления - "Удален файл ???µ?±?µ?»?µ??????.txt", просто названия русские отображает норм.
Где ты ничего не можешь сделать - ты ничего не должен хотеть
https://forum.lissyara.su/
Код: Выделить всё
/usr/local/www/net2ftp/languages/languages.inc.php
Код: Выделить всё
function __() {
// --------------
// This function returns a translated message; the core standard function used is sprintf (see manual)
// Input: - from function argument: message name $args[0] and variable parts in the message $args[1], $args[2],...
// (there is a variable nr of variable parts)
// - from globals: the array of messages $message
// Output: string in the language indicated in $net2ftp_language
// --------------
// -------------------------------------------------------------------------
// Global variables
// -------------------------------------------------------------------------
global $net2ftp_globals, $net2ftp_messages;
// -------------------------------------------------------------------------
// Get the arguments of this function
// $args[0] contains the messagename
// $args[1], $args[2], ... contain the variables in the message
// -------------------------------------------------------------------------
$numargs = func_num_args();
$args = func_get_args();
$messagename = $args[0];
// -------------------------------------------------------------------------
// Create the argument for the sprintf function
// Aim is to have something like: sprintf($string_with_percents, $args[1], $args[2], ...);
// As there is a variable nr of arguments in the function __, there is also a variable
// nr of arguments in sprintf, and this must be constructed with a loop
// -------------------------------------------------------------------------
// Check if the message with that $messagename exists
if (@array_key_exists($messagename, $net2ftp_messages)) { $string_with_percents = $net2ftp_messages[$messagename]; }
else { return "MESSAGE NOT FOUND"; }
$sprintf_argument = "\$translated_string = sprintf(\$string_with_percents";
for ($i=1; $i<$numargs; $i++) {
$sprintf_argument .= ", @htmlentities(\$args[$i], ENT_QUOTES)";
} // end for
$sprintf_argument .= ");";
// -------------------------------------------------------------------------
// Run the sprintf function
// -------------------------------------------------------------------------
eval($sprintf_argument);
return $translated_string;
} // end function __
Код: Выделить всё
$sprintf_argument .= ", @htmlentities(\$args[$i], ENT_QUOTES)";
Код: Выделить всё
$sprintf_argument .= ", @htmlentities(\$args[$i], ENT_QUOTES, 'UTF-8')";
Код: Выделить всё
Вы действительно хотите удалить эти файлы и папки?
Все подпапки и файлы в указанных папках будут удалены!
Файл ???µ?±?µ?»?µ??????.txt
Файл ?????????????·.jpg
Код: Выделить всё
$sprintf_argument .= ", @htmlentities(\$args[$i], ENT_QUOTES)";
Код: Выделить всё
$sprintf_argument .= ", @htmlentities(\$args[$i], ENT_QUOTES, 'CP1251')";
Код: Выделить всё
Вы действительно хотите удалить эти файлы и папки?
Все подпапки и файлы в указанных папках будут удалены!
Файл Сценарий нового года.doc
Код: Выделить всё
/usr/local/www/net2ftp/languages/ru.inc.php
Код: Выделить всё
//encoding
$net2ftp_messages["iso-8859-1"] = "utf-8";
Код: Выделить всё
windows-1251
Код: Выделить всё
//encoding
$net2ftp_messages["iso-8859-1"] = "windows-1251";
Код: Выделить всё
$sprintf_argument .= ", @htmlentities(\$args[$i], ENT_QUOTES)";
Код: Выделить всё
$sprintf_argument .= ", @htmlentities(\$args[$i], ENT_QUOTES), 'windows-1251'";
Код: Выделить всё
//encoding
$net2ftp_messages["iso-8859-1"] = "windows-1251";
Код: Выделить всё
$sprintf_argument .= ", @htmlentities(\$args[$i], ENT_QUOTES, 'CP1251')";
php.ini параметр memory_limit =RusLanR писал(а): В каком файле?
Код: Выделить всё
mysql net2ftp < /usr/local/www/net2ftp/create_tables.sql
ERROR 1064 (42000) at line 3: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 1
Код: Выделить всё
Checking files:
Файл sd.zip Ok
Transferring files to the FTP server:
Проверка архива nr 1: sd.zip