Jump to content

mr_sarge

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mr_sarge's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. nothing is display with this code on when I upload a big file...
  2. the file that I am trying to upload and resize is 900kb 2272x1704 the file is uploaded, I can see it and open it on the server manually. When the scrypt try to resize it, notting append. the html page that I should see with a "correct" confirmation is not display. My page is look this: Header Menu PHP SCRIPT TO RESIZE PHP SCRIPT THAT CONFIRM THAT ALL IS OK some link footer Is image is less than 500kb all of this is ok. If I try my 900kb image, html page stop after the menu part. my link and footer are not displayed and in the source, tha table aren't close !!
  3. I have this simple code that I've found in the php manuel to resize image. I work great, but if the image is too big, script crash and wont resize the image. I have set a limit to 1280x1024 since all that is bigger than this crash. I don't know if it's the image file size in kb or it's dimension, but what can I do? [code] // Get new sizes for thumb list($width, $height) = getimagesize($prod_img); $newwidth = "200"; $newheight = "150"; // Load $thumb = imagecreatetruecolor($newwidth, $newheight); $source = imagecreatefromjpeg($prod_img); // Resize imagecopyresampled($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); // Output imagejpeg($thumb, $prod_img_thumb); [/code]
  4. I finally got it worked, thanks ! But I decide to change my code, since if you delete a file (ex: 4.php) the page make error ! Is there a manner to do the same think (split after 10 entrie) with the new code?: [code] $handle = opendir('./user/');    while (false !== ($file = readdir($handle))) {        if ($file != "." && $file != "..") {            require_once $c ."". $file;             ?>              <?php echo $user ?><br />         <?php echo $year ?><br />         <?php echo $country ?><br />                                             <?php        }    }    closedir($handle); [/code] Thanks again!
  5. it's ok, I saw that the openner was not there. But it's the other loop that don't seam to be ok. it's stop after the last user detail, and if I close php there to close my table and put the footer, nothing appear ont the page. the source of the page stop with "canada<br />" that is the last line that appear witch is the last line in the loop. Thanks a lot for your help!
  6. someone know how to make Andy's script to work? Thanks
  7. Thanks Andy, The first part work. If I have 4 file it print 4 entries, if 5, print 5, etc. But it stop there. All thing after the "}" of the "For" don't work. I have try to remove the last part of code and finish with "} ?>" but the rest of my html page don't appear.
  8. Ok , thanks. I've read the array fonction page, but I don't really know how to use it !! could someone give me a hint on how to mkae it or send me an exemple so I can view how it work please? Thanks
  9. Hi, I'm new to php and try to make something simple (I think !) I have a folder with PHP file that contain user data (1 file per user) I have a php page that look how many file there is in this folder, and then make an output of thoose file. How can I make this list to stop after 10 line, and than have a link to the page 2, 3, 4, etc. (that will refresh the current page with the next 10 line) Here is the code for the folder check: [code] <?php $folder = opendir($whichSection . "./user/" . $who . "/"); $counter = 0; while($file = readdir($folder)){    if($file != '.' && $file != '..'){       $counter++;    } } closedir($folder); ?> [/code] and this is the code that return the content of the php file (I have shortened the file contend, in realty they have 10 entry each that appear in table, etc): [code] <?php for ($i=1; $i<=$counter; $i++) { $c = "./user/"; $p = ".php"; require_once $c ."". $i ."". $p ?>     <?php echo $user ?><br />     <?php echo $name ?><br />     <?php echo $country ?><br /> <?php } ?> <!-- and here I want "page: 2 - 3 - 4 - 5 - etc" --> [/code] Is there a way to do that easely? and I don't use database because it will never exeed 45-50 entry that are create and delete each month Thanks and sorry for my bad english, i'm french ;)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.