Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
php directory assistance
Old 08-04-2004, 01:05 AM php directory assistance
Junior Talker

Posts: 2
Trades: 0
Heres the background:
I have a php album located at album.php that I am trying to insert into day1.php, but I'm getting a whole bunch of errors about stuff not being found...

go here and scroll down
http://jeweladdict.com/day1.php

you get these errors:


Warning: opendir(imgs/thumbs): failed to open dir: No such file or directory in /home/jewel/domains/jeweladdict.com/public_html/day1/album.php on line 25

Warning: readdir(): supplied argument is not a valid Directory resource in /home/jewel/domains/jeweladdict.com/public_html/day1/album.php on line 27


Warning: closedir(): supplied argument is not a valid Directory resource in /home/jewel/domains/jeweladdict.com/public_html/day1/album.php on line 55

<--see the folders? they exist!
so whats it all mean?

<-- there are the items in the directory above it

all the protections are a 7/5/5

if you go here: www.jeweladdict.com/day1/album.php everything works fine


any help would be awesome



albums.php:
PHP Code:
<?php
///////////// PHP PHOTO ALBUM v 1.0 //////////
//                                                                                        //
//                        Author: Daniele Leone                        //
//                        Email: [email]info@danieleleone.com[/email]        //
//                        Website: [url]www.danieleleone.com[/url]        //
//                                                                                        //
//////////////////////////////////////////////
?>


<?

// CONFIGURATION

        
$cols 8// columns number
        
$table_bg_color "black";  // table background color
        
$table_border "";  // table border size
        
$table_width "100%";  // table width

// DO NOT EDIT BELOW

        
$i =1;
        
$files = array ();
        
$myDirectory opendir("imgs/thumbs");
        echo 
"<table width='$table_width' bgcolor = '$table_bg_color' border ='$table_border' cellpadding='5' cellspacing='0'><tr>";
        while (
$file readdir($myDirectory)) {

        if ((
$file != ".") && ($file != "..") && ($file != "index.php") && !(is_dir("imgs/$file")) )
        {
    
$files[] = $file;
        if (
is_int($i $cols)) {
        list(
$width$height) = getimagesize("imgs/$file");
        echo 
"<td align='center'>";
        
?>
        <a href="#" onClick="MyWindow=window.open('viewer.php?file=<?php echo $file;?>','MyWindow','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,width=<?php echo "$width";?>,height=<?php echo "$height";?>,left=20,top=20'); return false;">
        <?
        
echo "<img src='imgs/thumbs/$file' border='0'></a>";
        echo 
"</td></tr><tr>";
        }
        else
        {
        list(
$width$height$type$attr) = getimagesize("imgs/$file");
        echo 
"<td align='center'>";
        
?>
        <a href="#" onClick="MyWindow=window.open('viewer.php?file=<?php echo $file;?>','MyWindow','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,width=<?php echo "$width";?>,height=<?php echo "$height";?>,left=20,top=20'); return false;">
        <?
        
echo "<img src='imgs/thumbs/$file' border='0'></a>";
        echo 
"</td>";
        }
        
$i++;
        }
        }
        echo 
"</tr></table>";
        
closedir($myDirectory);
        
    
// DO NOT REMOVE THAT TO MAKE THE SCRIPT WORKING
  // include ("http://www.danieleleone.com/script.php");
   // ---------------------------------------------
        
        
        
?>

viewer.php:
PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>PHPphotoalbum</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
-->
</style></head>

<body>
<?php
    $file 
$HTTP_GET_VARS['file'];
    echo 
"<img src='imgs/$file'>";
    
?>
</body>
</html>
jeweladdict is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-04-2004, 06:07 PM
Junior Talker

Posts: 2
Trades: 0
aww no love for me
cmon people!
jeweladdict is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to php directory assistance
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.12634 seconds with 12 queries