Uploading Images....

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mindmeddler2002
Forum Newbie
Posts: 21
Joined: Mon Nov 04, 2002 3:09 pm
Location: US, PA, Harrisuburg

Uploading Images....

Post by mindmeddler2002 »

Ok, I know this is a common thing, but i tried it all....

ok i tied these codes...

Code: Select all

if ($photo2 != "") { 
chmod($destDir, 0777); 
move_uploaded_file("$photo2", $destDir."image2.jpg") or die("Couldn't copy the file!"); 
chmod($destDir, 0755); 
}
that one did not work at all, juts returned that it could not copy

Code: Select all

if ($photo2 != "") { 
chmod($destDir, 0777); 
copy("$photo2", $destDir."image2.jpg") or die("Couldn't copy the file!"); 
chmod($destDir, 0755); 
}
that one worked on localhost (my server to my server) but on everyone elses it retured a error, which i lost. But it was something about not able to access there computer....

Code: Select all

copy($photo2, $destDir."image2.jpg");

if(!empty($photo2))
  {
    if(is_uploaded_file($photo2) && preg_match("/^їA-Za-z0-9\-\.\_\+]*$/",image2.jpg))
    {
      copy($photo2, $destDir."image2.jpg");
}}
that is the last way i tried
that one just works on my local host again
on other it returned the image, but empty, i did not try the last one from another computer

if u want to go here, http://www.icaruscolony.com
make a account, on the bottom left is a writers pannel, follow the steps throgh that, when u get to where u need to write a artilce, type some stuff in, but make sure its over 400 chars... and with spaces, no words over 60 chars... ok thanks
Post Reply