PSD-Tutorials.de
Forum für Design, Fotografie & Bildbearbeitung
Tutkit
Agentur
Hilfe
Kontakt
Start
Forum
Aktuelles
Besonderer Inhalt
Foren durchsuchen
Tutorials
News
Anmelden
Kostenlos registrieren
Aktuelles
Suche
Suche
Nur Titel durchsuchen
Von:
Menü
Anmelden
Kostenlos registrieren
App installieren
Installieren
JavaScript ist deaktiviert. Für eine bessere Darstellung aktiviere bitte JavaScript in deinem Browser, bevor du fortfährst.
Du verwendest einen veralteten Browser. Es ist möglich, dass diese oder andere Websites nicht korrekt angezeigt werden.
Du solltest ein Upgrade durchführen oder einen
alternativen Browser
verwenden.
Antworten auf deine Fragen:
Neues Thema erstellen
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
Hilfe bei php4
Beitrag
<blockquote data-quote="irontom100" data-source="post: 2139663" data-attributes="member: 134620"><p>ich habe einen code geschrieben und bekomme eine fehler meldung wenn ich ihn ausfüren möchte</p><p>Fhelermeldung:</p><p><strong>Warning</strong>: require_once(config.inc.php) []: failed to open stream: No such file or directory in <strong>F:\UsbWebserver\Root\ftpgallery\fotos\test\index.php</strong> on line <strong>4</strong></p><p></p><p><strong>Fatal error</strong>: require_once() []: Failed opening required 'config.inc.php' (include_path='.;C:\php5\pear') in <strong>F:\UsbWebserver\Root\ftpgallery\fotos\test\index.php</strong> on line <strong>4</strong></p><p></p><p>code der seite:</p><p>[PHP]</p><p><?php</p><p></p><p></p><p>require_once('config.inc.php');</p><p></p><p></p><p>function create_thumb($filename,$width=THUMB_WIDTH,$height=THUMB_HEIGHT){</p><p> if(!file_exists("thumb/thumb_".substr($filename,0, -4).".png")){ </p><p> $info = getimagesize($filename);</p><p> $factor = $width/$info[0];</p><p> if(($height/$info[1])<$factor)$factor = $height/$info[1]; </p><p> $factor = floor($factor*10000)/10000;</p><p> </p><p> $im = imagecreatetruecolor(THUMB_WIDTH, THUMB_HEIGHT);</p><p> $back_color = imagecolorallocate($im,THUMB_BG_COLOR_RED,THUMB_BG_COLOR_GREEN,THUMB_BG_COLOR_BLUE);</p><p> imagefill($im,0,0,$back_color);</p><p> </p><p> switch ($info[2]) {</p><p> case 1:</p><p> $image = imagecreatefromgif($filename); </p><p> break;</p><p> case 2:</p><p> $image = imagecreatefromjpeg($filename);</p><p> break; </p><p> case 3:</p><p> $image = imagecreatefrompng($filename);</p><p> break;</p><p> }</p><p> </p><p> imagecopyresized($im, $image,(THUMB_WIDTH-intval(round($info[0]*$factor,0)))/2, (THUMB_HEIGHT-intval(round($info[1]*$factor,0)))/2, 0, 0, intval(round($info[0]*$factor,0)), intval(round($info[1]*$factor,0)), $info[0], $info[1]);</p><p> imagepng($im,("thumb/thumb_".substr($filename,0, -4).".png"));</p><p> imagedestroy($im);</p><p> }</p><p> return TRUE;</p><p>}</p><p>if(!is_dir("thumb")) mkdir("thumb");</p><p>$pictures = glob('*.{jpg,png,gif}',GLOB_BRACE);</p><p>if($pictures){</p><p>echo '<ul class="gallery">'."\n";</p><p>foreach ($pictures as $filename) {</p><p> if(create_thumb($filename)){</p><p> echo '<li>';</p><p> echo "<a href='$filename' rel='shadowbox[Mixed];'><img src='thumb/thumb_" . substr($filename,0, -4) . ".png' /></a>";</p><p> echo '</li>'."\n";</p><p> }</p><p>}</p><p>echo '</ul>'."\n";</p><p>}</p><p>?></p><p><link rel="stylesheet" type="text/css" href="../../css/gallery.css"></p><p><link rel="stylesheet" type="text/css" href="../../css/shadowbox/shadowbox.css"></p><p><script type="text/javascript" src="../../css/shadowbox/shadowbox.js"></script></p><p><script type="text/javascript"></p><p>Shadowbox.init({</p><p> counterType: "skip",</p><p> continuous: true,</p><p> enableKeys: true,</p><p> displayNav: true,</p><p> slideshowDelay: 3</p><p>});</p><p></script></p><p>[/PHP] die config</p><p>[PHP]</p><p><?php</p><p></p><p>define('THUMB_WIDTH' , 160); // Breite des Thumbnails</p><p>define('THUMB_HEIGHT', 120); // Höhe des Thumbnails</p><p></p><p>define('THUMB_BG_COLOR_RED' , 200); // Rotanteil der Hintergrundfarbe des Thumbnails (0-255)</p><p>define('THUMB_BG_COLOR_GREEN', 200); // Grünanteil der Hintergrundfarbe des Thumbnails (0-255)</p><p>define('THUMB_BG_COLOR_BLUE' , 200); // Blauanteil der Hintergrundfarbe des Thumbnails (0-255)</p><p></p><p>?></p><p>[/PHP]was mache ich verkehrt?</p><p>danke für eure hilfe</p></blockquote><p></p>
[QUOTE="irontom100, post: 2139663, member: 134620"] ich habe einen code geschrieben und bekomme eine fehler meldung wenn ich ihn ausfüren möchte Fhelermeldung: [B]Warning[/B]: require_once(config.inc.php) []: failed to open stream: No such file or directory in [B]F:\UsbWebserver\Root\ftpgallery\fotos\test\index.php[/B] on line [B]4[/B] [B]Fatal error[/B]: require_once() []: Failed opening required 'config.inc.php' (include_path='.;C:\php5\pear') in [B]F:\UsbWebserver\Root\ftpgallery\fotos\test\index.php[/B] on line [B]4[/B] code der seite: [PHP] <?php require_once('config.inc.php'); function create_thumb($filename,$width=THUMB_WIDTH,$height=THUMB_HEIGHT){ if(!file_exists("thumb/thumb_".substr($filename,0, -4).".png")){ $info = getimagesize($filename); $factor = $width/$info[0]; if(($height/$info[1])<$factor)$factor = $height/$info[1]; $factor = floor($factor*10000)/10000; $im = imagecreatetruecolor(THUMB_WIDTH, THUMB_HEIGHT); $back_color = imagecolorallocate($im,THUMB_BG_COLOR_RED,THUMB_BG_COLOR_GREEN,THUMB_BG_COLOR_BLUE); imagefill($im,0,0,$back_color); switch ($info[2]) { case 1: $image = imagecreatefromgif($filename); break; case 2: $image = imagecreatefromjpeg($filename); break; case 3: $image = imagecreatefrompng($filename); break; } imagecopyresized($im, $image,(THUMB_WIDTH-intval(round($info[0]*$factor,0)))/2, (THUMB_HEIGHT-intval(round($info[1]*$factor,0)))/2, 0, 0, intval(round($info[0]*$factor,0)), intval(round($info[1]*$factor,0)), $info[0], $info[1]); imagepng($im,("thumb/thumb_".substr($filename,0, -4).".png")); imagedestroy($im); } return TRUE; } if(!is_dir("thumb")) mkdir("thumb"); $pictures = glob('*.{jpg,png,gif}',GLOB_BRACE); if($pictures){ echo '<ul class="gallery">'."\n"; foreach ($pictures as $filename) { if(create_thumb($filename)){ echo '<li>'; echo "<a href='$filename' rel='shadowbox[Mixed];'><img src='thumb/thumb_" . substr($filename,0, -4) . ".png' /></a>"; echo '</li>'."\n"; } } echo '</ul>'."\n"; } ?> <link rel="stylesheet" type="text/css" href="../../css/gallery.css"> <link rel="stylesheet" type="text/css" href="../../css/shadowbox/shadowbox.css"> <script type="text/javascript" src="../../css/shadowbox/shadowbox.js"></script> <script type="text/javascript"> Shadowbox.init({ counterType: "skip", continuous: true, enableKeys: true, displayNav: true, slideshowDelay: 3 }); </script> [/PHP] die config [PHP] <?php define('THUMB_WIDTH' , 160); // Breite des Thumbnails define('THUMB_HEIGHT', 120); // Höhe des Thumbnails define('THUMB_BG_COLOR_RED' , 200); // Rotanteil der Hintergrundfarbe des Thumbnails (0-255) define('THUMB_BG_COLOR_GREEN', 200); // Grünanteil der Hintergrundfarbe des Thumbnails (0-255) define('THUMB_BG_COLOR_BLUE' , 200); // Blauanteil der Hintergrundfarbe des Thumbnails (0-255) ?> [/PHP]was mache ich verkehrt? danke für eure hilfe [/QUOTE]
Bilder bitte
hier hochladen
und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Zitate einfügen…
Authentifizierung
Wenn ▲ = 7, ▼ = 3, ◇ = 2 und die Summe von ▲ und ▼ durch ◇ geteilt wird, was ist das Ergebnis?
Antworten
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
Hilfe bei php4
Oben