Jump to content


Photo

PHP and Images


  • Please log in to reply
2 replies to this topic

#1 thx967

thx967
  • Members
  • Pip
  • Newbie
  • 5 posts

Posted 14 March 2006 - 07:07 PM

Is it true that for php to deal images they have to be on the server? i.e. getimagesize()


or can it handle functions from a form page prior to upload?

#2 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 14 March 2006 - 07:14 PM

[!--quoteo(post=355005:date=Mar 14 2006, 02:07 PM:name=thx967)--][div class=\'quotetop\']QUOTE(thx967 @ Mar 14 2006, 02:07 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Is it true that for php to deal images they have to be on the server? i.e. getimagesize()
or can it handle functions from a form page prior to upload?
[/quote]

as soon as a form is submitted, the uploaded files are in the $_FILES variable for you to be able to run functions on before you save them to your server. read up on a couple uploader scripts like [a href=\"http://www.tizag.com/phpT/fileupload.php\" target=\"_blank\"]this one[/a] to see more of what can be done before and after actual file transfer
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

#3 keeB

keeB
  • Staff Alumni
  • Advanced Member
  • 1,078 posts
  • LocationCalifornia

Posted 14 March 2006 - 07:19 PM

I don't think you can do it from client -> server if that's what you're asking, since PHP needs to process the page after it's submitted.

That would be intriguing to develop.. the only way I could see that working is using Ajax to upload the image to a temp directory, get information on it, and then decide what to do with it that way..

Come visit my site to see my latest projects
http://nick.stinemates.org/wordpress/





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users