Jump to content

aNubies

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by aNubies

  1. Thank you very much for all the responses, as further research with Mr. Google yeah it is not possible to get the value of file input due to security issues. By occurances I accidentally used the $_FILES['']['tmp_name'] and it does what I need. Thank you very much guys .
  2. Anyone can help me, and I forget to tell why I need this because basically I'm going to create a copy of the file but re-scale and reduced quality. I made to do the re-scaling and reduce quality its just that I need the full path that is on the file input type. Thank you in advance
  3. Hello guys, I'm trying to get the full filepath that was browsed in input file type. I've search a lot in google and gave me basename, $_Files but can't make it work. Can you show me how to get it in the input file type and then display it in a another textbox, thank you in advance. This is my trial. <form action="" method="POST"> <input type="file" name="fileupload" /> <input type="text" name="filepath" /> <input type="submit" value="upload file" /> </form> /* This php code doesn't work at all */ <?php $_POST['filepath'] = $_FILES['fileupload']; $_POST['filepath'] = basename($_FILES['fileupload']['name']; ?> /* This only display the name of the file that uploaded. */ <?php echo $_POST['fileupload']; ?> So as I have said what I want to achieve is that when I browse the file either after I press the upload file button it will display the full path in a another textbox or after I browse the file it will display in another textbox right away.
  4. Well that's the easiest thing though, I'm gonna create a folder that will served for images only and permitted with a full control. Thank you very much.
  5. Sorry for the late reply and thank you for the quick response, I figured it out now it is because of whitespace. Is PHP that strict? And now my problem is Permission Denied, I figured it out because of the writeprotection of the folder since what im doing right now is creating a new resize image base on the original image. But I can't set up the folder into everyone with full control, can anyone point me out how to do this.
  6. Hi guys, this would be my first post here as a new member . Let me start what my purpose right away, I have this piece of code trying out the ImageJpeg() function. <?php // Create a blank image and add some text $im = imagecreatetruecolor(120, 20); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color); // Set the content type header - in this case image/jpeg header('Content-Type: image/jpeg'); // Output the image imagejpeg($im); // Free up memory imagedestroy($im); ?> The site that I got the code showned the supposed right output. But mine give me this output (see the attached image). Why is that happening? Sorry I'm new in PHP and don't know what to do. Please help me out thank you in advance.
×
×
  • 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.