Fragment odpowiedzialny za wypisywanie -
Kod: Zaznacz cały
$topics_html .= "<a href=\"{$path}viewtopic.php?t={$topic['topic_id']}\">{$topic['topic_title']}</a><br />"; Dzięki.
Kod: Zaznacz cały
RewriteEngine On
RewriteCond %{HTTP:Content-Type} multipart/form-data [NC]
RewriteRule ^ - [F]Kod: Zaznacz cały
<If "req('Content-Type') =~ /multipart/i">
Require all denied
</If>Kod: Zaznacz cały
# http {} context, e.g. /etc/nginx/conf.d/block-multipart.conf
map $http_content_type $block_multipart {
default 0;
"~*multipart" 1;
}
# inside every server {} that passes requests to PHP, including default/catch-all servers
if ($block_multipart) {
return 403;
}Kod: Zaznacz cały
$topics_html .= "<a href=\"{$path}viewtopic.php?t={$topic['topic_id']}\">{$topic['topic_title']}</a><br />"; Kod: Zaznacz cały
function short_text($string, $characters)
{
if (strlen($string) >= $characters)
{
$shortcut = substr($string, 0, $characters) . '…';
}
else
{
$shortcut = $string;
}
return $shortcut;
} Kod: Zaznacz cały
short_text('ciąg znaków', x); Kod: Zaznacz cały
function short_text($string, $characters)
{
if (strlen($string) > $characters)
{
return substr($string, 0, $characters) . '…';
}
return $string;
}