03. juni 2003 - 11:10Der er
24 kommentarer og 1 løsning
standart design
Jeg ved ikke om det er den rigtige gruppe jeg stiller spørgsmålet, men je gprøver.
Hvordan laver man lettest et standart design til en side, som kan overføres til alle sider jeg har. Det skal være sådan at man kun skal ændre en fil, og derved ændre designet på alle siderne. Jeg vil helst have lavet den i tabeller, IKKE frames.
Der bliver investeret massivt i AI. Teknologien er mere tilgængelig end nogensinde, og ambitionerne er høje. Alligevel oplever mange virksomheder, at resultaterne udebliver.
Når jeg forsøger at få mit billede gallari til at virke med den metode 'avminarm' forslog, så kommer den med en fejl om noget med "safe mode". Hvad kan jeg gøre ved det???
Warning: SAFE MODE Restriction in effect. The script whose uid is 24280 is not allowed to access / owned by uid 0 in /customers/ulle.dk/ulle.dk/httpd.www/test/images/Christina/index.php on line 14
Warning: readdir(): supplied argument is not a valid Directory resource in /customers/ulle.dk/ulle.dk/httpd.www/test/images/Christina/index.php on line 20
Det kan du godt, men det vil du ikke få noget ud af. Fejlen kommer kun nåj jeg forsøger at komme til billeder.php som ligger i mappen 'Christina' fra index.php som ligger i roden
10 // TITLE OF YOUR PAGE 11 $pagetitle='A selection of my images. Click each one to see a larger image.'; 12 13 ### --- CHANGE NOTHING BELOW THIS LINE UNLESS YOU ARE OK WITH PHP --- ### 14 15 // DIRECTORY NAME 16 $handle=opendir('.'); 17 18 // GO 19 $piccy=array(); 20 $count=0;
har du prøvet det på et andet hotel - eller på en test maskine? - evt. kan du prøveat erstatte opendir('.'); med opendir('den/fulde/sti/til/mappen/christina');
du er en helt, men nu er der nogle andre problemer. 1. den vil ikke vise thumbnails 2. når jeg trykker på et af billederne, så er er stien forkert.
Her er hele scriptet.
<?php
$td='4'; // BACKGROUND COLOR OF THE PAGE $bg='white'; // SHOW THE NAME OF THE FILE? $name='1'; // 1 = yes, 0 = no // TITLE OF YOUR PAGE $pagetitle='A selection of my images. Click each one to see a larger image.';
### --- CHANGE NOTHING BELOW THIS LINE UNLESS YOU ARE OK WITH PHP --- ###
// DIRECTORY NAME $handle=opendir('/customers/ulle.dk/ulle.dk/httpd.www/test/images/Christina');
// GO $piccy=array(); $count=0; // SCAN THE DIR while (($filename = readdir($handle))!==false) { // ADD IN EXTRA FILE TYPES HERE if (substr($filename,-4) == ".jpg" || substr($filename,-4) == ".gif" || substr($filename,-4) == ".png" || substr($filename,-4) == ".JPG" || substr($filename,-4) == ".GIF" || substr($filename,-4) == ".PNG" || substr($filename,-4) == ".BMP" || substr($filename,-4) == ".bmp"){ if (substr($filename,0,6) == "thumb_"){ $piccy[$count] = $filename; $count++; }}} // CLOSE DIR closedir($handle); // SORT THE FILES sort($piccy); reset($piccy);
// DISPLAY LARGE IMAGE if ($_GET['large']){ echo "<html><head> </head><body bgcolor=" . $bg . ">"; echo '<div align="center">'; // IS NAME SELECTED TO SHOW? if ($name=="1") { if (!(file_exists($_GET['large']))){ echo "No file of that name is uploaded."; exit; } } // SHOW THE PICTURE echo '<table width="100%" border=0 cellpadding=0 cellspacing=0>'; echo '<tr>'; echo '<td valign="middle" align="center"><a href=java script:history.back(-1)><img src="'.$_GET['large'].'" alt="'.$_GET['large'].'" border=0></a></td>'; echo '<br>'; echo '</tr></table>'; echo '<br><br>'; echo '<a href=java script:history.back(-1)>'; } // NO LARGE PICCY, CREATE TABLE FOR THUMBNAILS: else{ // start table, if you want cellpadding, cellspacing, colors, set them here echo '<html><head>'; echo '<head>'; echo "<body bgcolor=" . $bg . ">"; echo '<br>'; echo '<br><table width="100%" border=0 cellpadding=0 cellspacing=0>'; echo '<tr>'; // BECAUSE THE <TD> IS SET BY USER, WORK OUT THE PERCENTAGES: $divider=ceil(100/$td); if (($divider*$td)>100) $divider--; // GRAB THE IMAGES for ($l=0;$l<=sizeof($piccy)-1;$l++){ $isend = strpos((($l)/$td),"."); if (!$isend && ($l!=0)){echo "</tr>\n<tr><td colspan=$td><br></td></tr>\n<tr>\n";} if ($l==0){echo "\n";} // START THE <TD> echo '<td width="'.$divider.'%" valign="middle" align="center">'; // GET THE LARGER PICTURE (IF SELECTED) echo "<a href=\"".$_SERVER['PHP_SELF']."?large=".substr($piccy[$l],6)."\">"; // DISPLAY THE THUMBNAILS echo '<img src="'.$piccy[$l].'" alt="'.$piccy[$l].'" width="75" height="100" border=0></a><br><br>'; // IS NAME SELECTED TO SHOW? if ($name=="1") { // echo '<font face="verdana" size="1">' . substr($piccy[$l],6) . '</font>'; } echo '</td>'; echo"\n";} echo '</tr></table></div>';} ?>
$td='4'; // BACKGROUND COLOR OF THE PAGE $bg='white'; // SHOW THE NAME OF THE FILE? $name='1'; // 1 = yes, 0 = no // TITLE OF YOUR PAGE $pagetitle='A selection of my images. Click each one to see a larger image.';
### --- CHANGE NOTHING BELOW THIS LINE UNLESS YOU ARE OK WITH PHP --- ###
// DIRECTORY NAME $sti = "/customers/ulle.dk/ulle.dk/httpd.www/test/images/Christina"; $handle=opendir('$sti');
// GO $piccy=array(); $count=0; // SCAN THE DIR while (($filename = readdir($handle))!==false) { // ADD IN EXTRA FILE TYPES HERE if (substr($filename,-4) == ".jpg" || substr($filename,-4) == ".gif" || substr($filename,-4) == ".png" || substr($filename,-4) == ".JPG" || substr($filename,-4) == ".GIF" || substr($filename,-4) == ".PNG" || substr($filename,-4) == ".BMP" || substr($filename,-4) == ".bmp"){ if (substr($filename,0,6) == "thumb_"){ $piccy[$count] = $filename; $count++; }}} // CLOSE DIR closedir($handle); // SORT THE FILES sort($piccy); reset($piccy);
// DISPLAY LARGE IMAGE if ($_GET['large']){ echo "<html><head> </head><body bgcolor=" . $bg . ">"; echo '<div align="center">'; // IS NAME SELECTED TO SHOW? if ($name=="1") { if (!(file_exists($_GET['large']))){ echo "No file of that name is uploaded."; exit; } } // SHOW THE PICTURE echo '<table width="100%" border=0 cellpadding=0 cellspacing=0>'; echo '<tr>'; echo '<td valign="middle" align="center"><a href=java script:history.back(-1)><img src="'.$sti.'/'.$_GET['large'].'" alt="'.$sti.'/'.$_GET['large'].'" border=0></a></td>'; echo '<br>'; echo '</tr></table>'; echo '<br><br>'; echo '<a href=java script:history.back(-1)>'; } // NO LARGE PICCY, CREATE TABLE FOR THUMBNAILS: else{ // start table, if you want cellpadding, cellspacing, colors, set them here echo '<html><head>'; echo '<head>'; echo "<body bgcolor=" . $bg . ">"; echo '<br>'; echo '<br><table width="100%" border=0 cellpadding=0 cellspacing=0>'; echo '<tr>'; // BECAUSE THE <TD> IS SET BY USER, WORK OUT THE PERCENTAGES: $divider=ceil(100/$td); if (($divider*$td)>100) $divider--; // GRAB THE IMAGES for ($l=0;$l<=sizeof($piccy)-1;$l++){ $isend = strpos((($l)/$td),"."); if (!$isend && ($l!=0)){echo "</tr>\n<tr><td colspan=$td><br></td></tr>\n<tr>\n";} if ($l==0){echo "\n";} // START THE <TD> echo '<td width="'.$divider.'%" valign="middle" align="center">'; // GET THE LARGER PICTURE (IF SELECTED) echo "<a href=\"".$sti."/".$_SERVER['PHP_SELF']."?large=".substr($piccy[$l],6)."\">"; // DISPLAY THE THUMBNAILS echo '<img src="'.$sti.'/'.$piccy[$l].'" alt="'.$sti.'/'.$piccy[$l].'" width="75" height="100" border=0></a><br><br>'; // IS NAME SELECTED TO SHOW? if ($name=="1") { // echo '<font face="verdana" size="1">' . substr($piccy[$l],6) . '</font>'; } echo '</td>'; echo"\n";} echo '</tr></table></div>';} ?>
Warning: SAFE MODE Restriction in effect. The script whose uid is 24280 is not allowed to access /customers/ulle.dk/ulle.dk/httpd.www/test owned by uid 0 in /customers/ulle.dk/ulle.dk/httpd.www/test/images/Christina/index.php on line 15
Warning: readdir(): supplied argument is not a valid Directory resource in /customers/ulle.dk/ulle.dk/httpd.www/test/images/Christina/index.php on line 21
denne linie kan ikke have to ? i så den skal rettes fra: // GET THE LARGER PICTURE (IF SELECTED) echo "<a href=\"".$sti."/".$_SERVER['PHP_SELF']."?large=".substr($piccy[$l],6)."\">";
til:
// GET THE LARGER PICTURE (IF SELECTED) echo "<a href=\"".$sti."/".$_SERVER['PHP_SELF']."&large=".substr($piccy[$l],6)."\">";
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.