PHP - How Tmp_name Generates?
Hi guys,
I've been doing all kinds of things for about 3 weeks to find out how on earth does php generate tmp_name for $_FILE? I have many questions about it... For example, Is it possible to change tmp_name before uploading files? If not, is it possible to generate or calculate tmp_name before reaching $_FILE['<your file field>']['tmp_name']. I hope someone can answer my questions. Thanks Memphis Similar TutorialsWhat is $_FILES['userfile']['tmp_name']?? Is it a two-dimensional array? Why can't I have a $_FILES['tmp_name']?? Debbie Just a question concerning the $_FILES['tmp_name'] field. I'm uploading a file which is being moved into two different locations. I run an 'If' check to see if either process fails but as I am running them both at the same time, when a $_FILES['tmp_name'] is moved, can it be used again? Both my functions run fine independetly but when I try run them both it doesn't work So my question is which may be seem fairly obvious: Once you move the $_FILES['tmp_name'] is it removed from the temp folder it's in? or is it copied? Thanks! I have another thread, but it's on a different question.
// remake image if(create_image($fileExt, $_FILES["myfile"]["tmp_name"], $_FILES["myfile"]["tmp_name"], 80) !== FALSE){ // generate thumbnail if(generatethumbs2('.'.$fileExt, $_FILES["myfile"]["tmp_name"], 120, $_FILES["myfile"]["tmp_name"], 85) == TRUE){ $aws = new s3; $aws = $aws->putObject($newFileName, $_FILES["myfile"]["tmp_name"]); image_string($username,$newFileName,$mysqli); } }Is my code. How do I access both the remade image AND the thumbnail? Currently, I can only access the thumbnail. I need to be able to access them concurrently for upload to Amazon s3. i have a php form where users can update db. but when the input has a <a href=""></a> input, it generates back slashes on the web. below is the results after the input. Code: [Select] <a href=\'\\\"images/gallery/storyslideshow/ppic-5 (1).jpg\'\\\" rel=\'\\\"lyteshow[featgallery]\'\\\" title=\'\\\"\'\\\">View Slideshow</a><br><br> i have a this on my updating code Code: [Select] mysql_real_escape_string($_POST["fulldesc"]); I have a function that get's a quick single item from a query: function gimme($sql) { global $mysqli; global $mytable; global $sid; $query = "SELECT ".$sql." FROM ".$mytable." WHERE sid = ".$sid; $result = $mysqli->query($query); $value = $result->fetch_array(MYSQLI_NUM); $$sql = is_array($value) ? $value[0] : ""; return $$sql; // this is what I've tried so far $result->close(); } It works great as: echo(gimme("name")); Then I realized that I could use that as a variable ('$name' in this case) elsewhere. However, I can't figure out how get that new, variable variable 'outside' of the function. As such, echo($name); isn't working outside the function. Is there a way to return a variable variable? In other words, is there a way to make a function that creates a variable variable that will available outside of the function?
Thanks
|