Jump to content

thunderstorm

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

thunderstorm's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hi will this site help? http://27.org/isocountrylist/ Peter
  2. Hi there MasterK and ProjectFear Thank you 2 for helping with code. It now works, i posted the code below for others. Based on your idea MasterK, i removed a period from inbetween '.' and it worked. It now displays all the student images and the register clerk can carry on doing what she does with disregard to file names. Thank you Peter $lower = ".jpg"; $upper = ".JPG"; if (file_exists('../images/mbr_images/' . H($mbr->getBarcodeNmbr()) . '' . $lower)) { echo $lower; } else { echo $upper; } PS for others using the code please replace the H($mbr->getBarcodeNmbr()) with however you get your images from the database. In my case it was barcode numbers that matched image name. Thanks
  3. Hi thanks for your reply. That has swapped what i had before, it now displays all upper case extension images and ignores lower case ones. Any further suggestions? <img src=../images/mbr_images/<?php echo H($mbr->getBarcodeNmbr()); $lower = ".jpg"; $upper = ".JPG"; if (file_exists('../images/mbr_images/' . H($mbr->getBarcodeNmbr()) . '.' . $lower)) { echo $lower; } else { echo $upper; } ?> height=150 width=100</img> Code as it is now with your additions. Thanks Peter
  4. HI still stuck on this if anyone has some code to achieve this. Here's what i have, and yes it sucks but at least i am trying. <img src=../images/mbr_images/<?php echo H($mbr->getBarcodeNmbr()); $lower = ".jpg"; $upper = ".JPG"; if ($lower != $lower) { echo $lower; } else { echo $upper; } ?> height=150 width=100 border=1px </img> Thanks peter
  5. yes i know it still does not make sense, i was just showing you the changes so far and then i was going to go have a read from the site you posted. more code i need to figure out? the image prefix name comes from the barcode number in the database (student id) ex: 1234 their photo is formatted 1234.jpg OR 1234.JPG in a file in a folder. the photos come from the student management system which is a non sql windows system. i copied them to the linux server to a folder. This thing i am working on is the library system and i thought it would be good for the librarian to see a photo of the student loaning books so she can see if its the right kid or not. Peter
  6. Hi ProjectFear Thanks for your reply. I know my codes are rubbish, i am but a novice and i do try. Here is the re-written code based on what you said. it works for lower case as you said it would. i am having a read on those suggestions you made and will see if i can work it out, if not i will ask here again. The extension comes from a folder of images. So i guess the script will have to read the file first to determine what case the extension is, correct? I thought the formatting was correct for displaying an image? if i move the php tag and such, it breaks The whole code is inbetween the img tags <img src=../images/mbr_images/<?php echo H($mbr->getBarcodeNmbr()); $lower = ".jpg"; $upper = ".JPG"; if ($lower = $lower) { echo $lower; } else { echo $upper; } ?> height=150 width=100 border=1px </img> Thanks peter
  7. Hi The file name extension is in both upper and lower case. So i would have 1234.jpg AND 1234.JPG which to linux are 2 separate files. I need some code to detect which case its in and display accordingly. TIA Peter
  8. Hi everyone. I have a small problem. I have a database that shows student images, in the format of 1234.jpg but the file name extension is in both upper case and lower case. My server OS is linux ubuntu. apache2 php5. Linux see these as 2 different file so will not show the upper case ones. 1234.JPG What i have already is working but for lower case only, i need something to detect when the extension is in uppercase and change accordingly. This is what i have now that works for lower case only. <img src=../images/mbr_images/<?php echo H($mbr->getBarcodeNmbr());?>.jpg height=150 width=100 border=1px </img This is what i have tried but gives me a filename of "1234jpg" see the "." is missing? and is still lower case. <img src=../images/mbr_images/<?php echo H($mbr->getBarcodeNmbr()); $image = jpg; $image2 = JPG; if ($image = $image) { echo $image; } else { echo $image2; };?> height=150 width=100 border=1px </img> can anyone offer any help please? TIA Peter
  9. Hiya. I have a load of sites i am swapping from IIS to apache and looking for an import tool / script to import the vhosts, will take forever manually but i fear that i will have too. OS is 2K on IIS setup, 2K3 on new setup,  Anyone know of such a tool TIA
×
×
  • 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.