Jump to content

DjMikeS

Members
  • Posts

    140
  • Joined

  • Last visited

    Never

About DjMikeS

  • Birthday 02/18/1984

Contact Methods

  • MSN
    michelvan_son@hotmail.com
  • Website URL
    http://www.mike2k.nl

Profile Information

  • Gender
    Male
  • Location
    [NL] Alphen aan den Rijn

DjMikeS's Achievements

Member

Member (2/5)

0

Reputation

  1. Have you also "cranked up" the max_script execution time ? Otherwise your script will be terminated by php before uploading is complete...
  2. Could it be because <input type="hidden" id="text" name="text" /> has no value assigned to it ?
  3. Have you tried setting wrap="physical" in your textarea element ?
  4. I'm using a custom build framework and I found out that the script itself is working. So I'm thinking that the framework is corrupting the data somewhere...I will have to dive in to this. For the time being, I could store the attachments (mostly images, screenshots) as BLOB in the database... Is there a reason not to save the image as BLOB ?
  5. I've tried that and it gives the same error. The filesize isn't zero because when I remove the header, it does output the raw data of the PNG. For some reason, I can't get the image to display properly.
  6. I've tried that but as soon as I uncomment the image/png header, FF starts complaining about the image containing errors and IE just outputs raw data... Is there anything else I can try to figure this out ?
  7. Of course, how could I forget the @... I've removed the @ and the header. The output is: �PNG ��� IHDR�����l���+�8���sRGB�������gAMA And a lot more of the same... What am I missing ?
  8. I tried removing the force-download header. Now IE gives me the option to download the png and FF wants to download the file.png.htm When I try downloading and opening the file in FF I get the bytestream instead of the actual image, so I'm thinking that's a header problem. I've changed it into this: <?php $url = arrayUrl($_GET['url']); $file = $html->includeAttachment($url['2'], $url['3']); header("Content-Type: image/png"); @readfile($file); ?> But that gives me the following error: The image “http://172.16.32.24/pecs/tickets/attachments/000001/screenie.png” cannot be displayed, because it contains errors. I can confirm that the image on the server is correct. What am I doing wrong ?
  9. I've tried your solution, MadTechie, it doesn't work as expected, but I want to show the image in the browser instead of forcing a user to download it. Is that possible ? I was thing about something along the lines of what ninnypants said. So I thought about using readfile() and then turn that outputstream back in to an image but I couldn't find a function for it. Can someone point me in the right direction ?
  10. Hi guys, I'm currently building a helpdesk system with tickets and stuff. I want to add attachments to tickets. These attachments are stored in a web inaccessible folder called "attachments". In this folder, there is a folder for each ticket which holds the attachments. The folder is protected by a .htaccess file. I want to include an image from this folder in the webpage so that user can view the attachments. I don't want users to browse the images directly.... Now, when someone browses to the attachment, a "Forbidden" error is returned. I would like to keep this... How can I do this ?
  11. And you need to have the php CLI installed... If you have Debian, just do: #sudo apt-get install php5-cli Then in your cron, call the file like: php /var/phpfile.php
  12. mrMarcus has a point, but by doing it that way is not really considered a best practice... What you want is an extra table eg. album_tracks You then create a field eg. album_id which belongs to a table where you store the albums... That way you can insert as many tracks as you want without having to create an array to insert or exploding the array to retrieve...
  13. I think this line is wrong: $new_name = $path, $_POST['files']; because later on you do: if (file_exists($path . $new_name)){ wouldn't that be: if (file_exists("uploads/uploads/file")){
×
×
  • 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.