Re: net2ftp (FreeBSD7.1 and apache22)
Добавлено: 2013-02-05 8:58:51
вот еще...
Русские солдаты не умирают - они отсутпают в рай, на перегруппировку
https://forum.lissyara.su/
Код: Выделить всё
<?php /* ----- Files ----- */ ?>
<?php if ($list["stats"]["files"]["total_number"]> 0) { ?>
<?php for ($i=1; $i<=sizeof($list_files); $i++) { ?>
<?php
// ----- Some PHP stuff -----
$rowcounter++;
if ($rowcounter % 2 == 1) { $odd_even = "odd"; }
else { $odd_even = "even"; }
if ($list_files[$i]["selectable"] == "ok") {
$onClick = "submitBrowseForm('" . $directory_js . "','" . $list_files[$i]["dirfilename_js"] . "','downloadfile','');";
$title = __("Download the file %1\$s", $list_files[$i]["dirfilename_js"]);
$style = "cursor: pointer; cursor: hand; width: 32px;";
$href = "<a style=\"white-space: nowrap;\" href=\"javascript:" . $onClick . "\">" . $list_files[$i]["dirfilename_html"] . "</a
>\n";
}
else {
$onClick = "";
$title = "";
$style = "";
$href = "<span style=\"white-space: nowrap;\">" . $list_files[$i]["dirfilename_html"] . "</span>";
}
// -------------------------- ?>
<tr class="browse_rows_<?php echo $odd_even; ?>" id="row<?php echo $rowcounter; ?>" onmouseover="this.style.color='#000000'; this.style.backgroundColor='#FFCC00';" onmouseout="this.style.color='#000000'; setColor_js(<?php echo $rowcounter; ?>, 'checkbox');">
<td title="<?php echo __("Select the file %1\$s", $list_files[$i]["dirfilename_html"]); ?>" style="text-align: center; width: 32px;">
<?php printDirFileProperties($rowcounter, $list_files[$i], "checkbox", "onclick=\"setColor_js($rowcounter, 'checkbox');\""); ?>
</td>
<td onclick="<?php echo $onClick; ?>" title="<?php echo $title; ?>" style="<?php echo $style; ?>">
<?php printMime("icon", $list_files[$i]); ?>
</td>
<td onclick="<?php echo $onClick; ?>" title="<?php echo $title; ?>" style="<?php echo $style; ?>">
<?php echo $href; ?>
</td>
Код: Выделить всё
[4] => Array ( [scanrule] => rule-1 [dirorfile] => - [dirfilename] => Книга1.xls [size] => 78848 [owner] => 10025 [group] => 10025 [permissions] => rwxr--r-- [mtime] => Mar 19 2012 [dirfilename_html] => Книга1.xls [dirfilename_url] => %D0%9A%D0%BD%D0%B8%D0%B3%D0%B01.xls [dirfilename_js] => Книга1.xls [selectable] => ok )
Код: Выделить всё
<td style="cursor: pointer; cursor: hand; width: 32px;" title="Скачать файл?????????°1.xls" onclick="submitBrowseForm('/','Книга1.xls','downloadfile','');">
<a href="javascript:submitBrowseForm('/','Книга1.xls','downloadfile','');" style="white-space: nowrap;">Книга1.xls</a>
</td>
Код: Выделить всё
$title = __("Download the file %1\$s", $list_files[$i]["dirfilename_html"]);
Код: Выделить всё
$title = $list_files[$i]["dirfilename_html"];
Код: Выделить всё
$title = __("Download the file %1\$s", $list_files[$i]["dirfilename_html"]);
Код: Выделить всё
$title = __("Download the file %1\$s", '') . ' ' . $list_files[$i]["dirfilename_js"];
Код: Выделить всё
%cat /usr/local/www/apache22/data/size.php
<?php
// $df содержит размер свободного места в каталоге "/"
$diskfsp = "/STORAGE/project";
$freespace = disk_free_space($diskfsp);
$mb = pow(1024,2);
$gb = $mb*1024;
$hdGnugb = $freespace/$gb;
$hdd_size = round($hdGnugb, 2);
$hdd_size_all = '<center>Свободного места на диске: <b><font color="red" size="3">'.$hdd_size.'</font></b> GB</center>';
Код: Выделить всё
?>%cat /usr/local/www/apache22/data/settings.inc.php
$net2ftp_settings["message_browse"] = "";
$net2ftp_settings["message_browse_hdd"] = $hdd_size_all;
Код: Выделить всё
%cat /usr/local/www/apache22/data/modules/browse/browse.inc.php
// ------------------------------------^M
// Browse message^M
// ------------------------------------^M
<------>if ($net2ftp_settings["message_browse"] != "" && $net2ftp_settings["message_browse"] != "Setting message_browse does not exist") {
<------><------>$warning_message = $net2ftp_settings["message_browse"];
<------>} else $warning_message = $net2ftp_settings["message_browse_hdd"];
для начала надо хотя-бы прочитать темуMister_X писал(а): как победить это все ???
в чем именно? у файла просто кодировка сменена?А у кого кракозяблы
Код: Выделить всё
cd /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')";
Код: Выделить всё
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, 'UTF-8')";
} // end for
$sprintf_argument .= ");";
// -------------------------------------------------------------------------
// Run the sprintf function
// -------------------------------------------------------------------------
eval($sprintf_argument);
return $translated_string;
} // end function __
В каком файле?dimsat1 писал(а):На дебьяне свой хост настраиваю, но это сути не меняет
Вопщем, после долгих поисков причины наконец-то результат.. Пробывал я раньше поднять лимит памяти с 128 до 256, результата не давало.
Решил ещё попробывать, поставил memory_limit = 512M и... стали скачиваться больие файлы.. Памяти-то на домашнем сервере всего гиг, вопщим поставил лимит 384мб Спасибо вам за помощь