Ich habe erfolgreich meinen Webserver zum laufen gebracht.
Die Installation eines Woltlab Forums war auch problemlos möglich!
Wenn ich in diesem Forum allerding ein Bild als Anhang in einem Beitrag mache, bekomme ich folgende Fehlermeldung:
- Code: Select all
Warning: getimagesize(attachments/download.gif) [function.getimagesize]: failed to open stream: No such file or directory in /opt/lampp/htdocs/attachment_show.php on line 28
Warning: Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/attachment_show.php:28) in /opt/lampp/htdocs/acp/lib/functions.php on line 82
Warning: Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/attachment_show.php:28) in /opt/lampp/htdocs/acp/lib/functions.php on line 82
Mal davon abgesehen, das das Bild nicht hochgeladen wird (kann ich ja per Hand nachholen), wird es auch nicht verkleinert, weil die Funktion "getimagesize" nicht gefunden wird.
Wie und Wo kann ich das denn auf meinem lokalen Board machen?
Auf einem "richtigen" Webserver funktioniert das einwandfrei!
EDIT:
Achso - hier die "attachment_show.php":
- Code: Select all
<?php
############################ Hier kannst du die Farben und anderes anpassen ########################
$tableborder = "#6F7B87"; // Tabellenrandfarbe
$tablecol = "#BFC2C4"; // Tabellenspaltenfarbe
$tbwidth = "300"; // Auf wieviel Pixel (Breite) soll das Bild in der Übersicht verkleinert werden,
// falls es zu groß sein sollte.
$tbheight = "300"; // Auf wieviel Pixel (Höhe) soll das Bild in der Übersicht verkleinert werden,
// falls es zu groß sein sollte.
####################################################################################################
/* Nachfolgend kannst du das Styling der Anzeige des Attachments bearbeiten */
if ($dateiab != ""){
$attachment = '<div align="right"><b>Dateianhang:</b>';
$attachment .= '<table border="0" cellpadding="0" cellspacing="0">';
$attachment .= '<tr>';
$attachment .= '<td bgcolor="' . $tableborder . '">';
$attachment .= '<table border="0" cellpadding="3" cellspacing="1" >';
$attachment .= '<tr>';
$attachment .= '<td bgcolor="' . $tablecol . '" align="left">';
if ($upfile_ext == "jpg" || $upfile_ext == "gif" || $upfile_ext == "jpeg" || $upfile_ext == "png"){
$url = "attachments/" . $dateiab;
list($src_width, $src_height) = getimagesize($url);
if ($src_width >= $tbwidth || $src_height >= $tbheight){
$attachment .= '<a href="' . $url . '" target="_blank"><img src="' . $url . '" widht="' . $tbwidth . '" height="' . $tbheight . '" border="0"></a>';
}
else {
$attachment .= '<img src="' . $url . '">';
}
}
else {
$attachment .= '<a href="attachment.php?action=aufruf&id=' . $beitrag . '"><font size="1">' . $dateiab . '</a>';
}
$attachment .= '</td></tr>';
$attachment .= '<tr>';
$attachment .= '<td bgcolor="' . $tablecol . '" align="right">';
$attachment .= '<img src="images/filetypes/' . $filetyp . '"> ';
$attachment .= '<font size="1">' . $size;
$attachment .= '</font></td>';
$attachment .= '</tr>';
$attachment .= '<tr>';
$attachment .= '<td bgcolor="' . $tablecol . '" align="right">';
$attachment .= '<font size="1">' . $loads;
$attachment .= '</font></td>';
$attachment .= '</tr>';
$attachment .= '</table>';
$attachment .= '</td>';
$attachment .= '</tr>';
$attachment .= '</table></div>';
}
else {
$attachment = "";
}
?>