@scootergrisen
Jeg får udskrevet det her:
Array
(
[0] => Core
[1] => bcmath
[2] => calendar
[3] => com_dotnet
[4] => ctype
[5] => date
[6] => ereg
[7] => filter
[8] => ftp
[9] => hash
[10] => iconv
[11] => json
[12] => mcrypt
[13] => SPL
[14] => odbc
[15] => pcre
[16] => Reflection
[17] => session
[18] => standard
[19] => mysqlnd
[20] => tokenizer
[21] => zip
[22] => zlib
[23] => libxml
[24] => dom
[25] => PDO
[26] => bz2
[27] => SimpleXML
[28] => wddx
[29] => xml
[30] => xmlreader
[31] => xmlwriter
[32] => apache2handler
[33] => Phar
[34] => mbstring
[35] => exif
[36] => gd
[37] => gettext
[38] => imap
[39] => mysql
[40] => mysqli
[41] => pdo_mysql
[42] => PDO_ODBC
[43] => pdo_sqlite
[44] => soap
[45] => sockets
[46] => SQLite
[47] => sqlite3
[48] => xmlrpc
[49] => mhash
)
EDITJeg har fået det til at virke!
- <?php
- require_once("includes/db/config.php");
- $url = "http://". $_SERVER['HTTP_HOST'] . "/movieworld/";
-
- function LoadJpeg($imgname)
- {
- $im = @imagecreatefromjpeg($imgname);
-
- if(!$im)
- {
- $im = imagecreatetruecolor(150, 30);
- $bgc = imagecolorallocate($im, 255, 255, 255);
- $tc = imagecolorallocate($im, 0, 0, 0);
-
- imagefilledrectangle($im, 0, 0, 150, 30, $bgc);
-
- imagestring($im, 1, 5, 5, 'Error loading ' . $imgname, $tc);
- }
-
- return $im;
- }
- header("Content-Type: image/jpeg");
-
- if(isset($_GET["id"])) {
- $id = stripslashes($_GET["id"]);
- $imgSQL = "SELECT * FROM img WHERE id = '". $id ."'";
- $imgQUERY = mysql_query($imgSQL);
-
- if(!$imgQUERY) {
- die(mysql_error());
- } else {
- if(mysql_num_rows($imgQUERY)==1) {
- $imgROW = mysql_fetch_assoc($imgQUERY);
-
- $img = LoadJpeg($url . $imgROW["url"]);
-
- } else {
- echo 'Billedet findes ikke!';
- }
- }
- }
-
- imagejpeg($img);
- imagedestroy($img);
- ?>
Indlæg senest redigeret d. 23.12.2011 14:50 af Bruger #16025