img.php
<?php { } else { require 'config.php'; $zapytanie = 'select * from pixarcell_galeria where id = "'.$_GET['id'].'"'; { if($ImgSize['mime']=='image/jpeg') { $filename = "./upload/prace/".$row['url']; // Set a maximum height and width $width = 150; $height = 100; // Get new dimensions if ($width && ($width_orig < $height_orig)) { $width = ($height / $height_orig) * $width_orig; } else { $height = ($width / $width_orig) * $height_orig; } $image_p = imagecreatetruecolor($width, $height); $image = imagecreatefromjpeg($filename); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig); // Output imagejpeg($image_p, null, 100); } } } ?>
a blad polega na tym ze gdt wywolam img.php?id=2 powinno wyswietlic miniaturke z upload\prace\tlb244v6280ralsdxhavim5t8865jzp0mirror2.jpg, a pojawia sie tylko to:
Kod
Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\WebServ\httpd-users\pixarcell\config.php:14) in C:\Program Files\WebServ\httpd-users\pixarcell\img.php on line 16
wstawienie ob_start(); na poczatku daje tylko taki wynik:
Kod
http://localhost/~pixarcell/img.php?id=2
... config.php wyglada tak:
<?php $db['baza'] = 'np'; $db['uzytkownik'] = 'root'; $db['host'] = 'localhost'; $db['haslo'] = ''; $db['prefix'] = 'pixarcell_'; $config['url'] = 'http:/localhost/~pixarcell/'; ?>
mam nadzieje, ze ktos mnie zrozumie i naprowadzi na jakis wlasciwy trop...
pozdrawiam
master
edit:
troche glupia sprawa.... przenioslem "twardo" zawartosci config.php do pliku img.php i wszystko dziala :| ale to takie troche nieporaczne ... ehhh , sory za klopot...