Current location: Hot Scripts Forums » Programming Languages » PHP » Uploading Images Using Forms


Uploading Images Using Forms

Reply
  #1 (permalink)  
Old 12-08-04, 06:30 PM
rockitdev rockitdev is offline
Newbie Coder
 
Join Date: Dec 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Question Uploading Images Using Forms

hey, stuck in a bind and need some help. i'm uploading files using forms, mainly images for a dynamic photo gallery and the files successfully upload. but, they will not appear because of unix permissions.

how do i change the permission while uploading the file to 0666? i understand i am supposed to use the cmod function in php, but do i do this in a seperate script? it would be nice in the code if it could convert the file to 0666 while it was uploading so i don't have any issues with that.

can someone help me with this?
Reply With Quote
  #2 (permalink)  
Old 12-08-04, 06:50 PM
eli03 eli03 is offline
Newbie Coder
 
Join Date: Oct 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
try something like this
$filename = $uploaddir.($account_id).$_FILES['userfile']['name'];
chmod($filename,666);
__________________
Elibest
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Uploading multiple images subnet_rx PHP 4 11-23-04 03:01 PM
Uploading multiple images and save to database peterpeter ASP 0 09-07-04 01:00 AM
GOING INSANE! - iFrames, Javascript (swap images) & Forms? gem JavaScript 4 04-19-04 04:54 AM
uploading multiple images mivec PHP 2 03-30-04 11:50 AM
Uploading images and saving info to dbase cyberonic0101 ASP 0 11-02-03 09:37 PM


All times are GMT -5. The time now is 05:18 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.