Jessamine
Trekkie

Offline
Posts: 11
|
 |
« on: June 05, 2007, 08:14:11 PM » |
|
I have upgraded my web server to VPS recently. There is still one issue something about php I can't resolved. Your System Admin Team recommend me to ask for help here.
Here is my issue: When I use my forum before,I can "upload" my image file smoothly. But it doesn't work now.I checked my php program which was not programmed by me and found these commands not be executed.
--------------------------------- copy($image1,"imgdb/".$pics); chmod("imgdb/".$pics, 0755); ---------------------------------------
I think the main reason is the permission of my folder, so that the copy fouction is invalid. How can I change the permisson of one folder without plesk or cpanel ?
I hope somebody can help me. Thank you very much.
For more details of my script: --------------------------------------------- // copy image file if($image1 != "none" && $image1 != "") { $pics = md5(uniqid(microtime(),1)).getmypid().".jpg"; if (!$fp=@fopen($image1,"r")) { echo "File open failed."; } else { copy($image1,"imgdb/".$pics); chmod("imgdb/".$pics, 0755); $size = makeimg("imgdb/".$pics); if($size > 1024) { unlink("imgdb/".$pics); mysql_query("DELETE FROM $table_name WHERE id=$id"); mysql_query("UPDATE $table_name SET replays=replays-1 WHERE id=$parent"); echo "Over 1024 "; exit; } mysql_query("INSERT INTO imgdb(cid, sid, iname, itxt, parent) VALUES('$cid','$id','$pics','$desc1','$parent')"); } unset($pics); unset($fp); } ------------------------------------------------------------
|