Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Problem z uploaderem
Laps_
post 13.03.2012, 13:17:23
Post #1





Grupa: Zarejestrowani
Postów: 15
Pomógł: 0
Dołączył: 6.02.2012

Ostrzeżenie: (10%)
X----


  1. // Uploaded Image
  2. if ($_POST['has_image']=="Yes" && empty($_REQUEST['image_url'])) {
  3. if (!file_exists($CONFIG['images_path'].$_FILES['file_image']['name']."")) {
  4. if (!move_uploaded_file($_FILES['file_image']['tmp_name'],$CONFIG['images_path'].$_FILES['file_image']['name']."")) {
  5. $admin->Error("Image was not uploaded do to errors");
  6. } else {
  7. $upload_image="Yes";
  8. chmod($CONFIG['images_path'].$_FILES['file_image']['name'],0644);
  9. }
  10. } else {
  11. $error .="Image with that name has already been uploaded<br>";
  12. }
  13. } else {
  14. $upload_image="No";
  15. }
  16. // Now uploading file if they uploaded one
  17. if (empty($_POST['file_url'])) {
  18. if (!file_exists($CONFIG['files_path'].$_FILES['file_file']['name']."")) {
  19. if (!move_uploaded_file($_FILES['file_file']['tmp_name'],$CONFIG['files_path'].$_FILES['file_file']['name']."")) {
  20. $admin->Error("File Was not uploaded do to errors");
  21. } else {
  22. $upload_file="Yes";
  23. chmod($CONFIG['files_path'].$_FILES['file_file']['name'],0644);
  24. }
  25. } else {
  26. $error .="File with that name has already been uploaded<br>";
  27. }
  28. } else {
  29. $upload_file="No";
  30. }
  31. if ($error) {
  32. if ($upload_file=="Yes") {
  33. unlink($CONFIG['files_path'].$_FILES['file_file']['name']);
  34. }
  35. if ($upload_image=="Yes") {
  36. unlink($CONFIG['images_path'].$_FILES['file_image']['name']);
  37. }
  38. $admin->Error($error);


Błąd w lini zacytowanej 19, nie jest to cały kod bo jest on spory a tutaj treść:

Cytat
Warning: move_uploaded_file() [function.move-uploaded-file]: SAFE MODE Restriction in effect. The script whose uid is 93308 is not allowed to access / owned by uid 0 in /var/www/sites/yoyo.pl/g/-/g-upload/Admin/file.php on line 96
Image was not uploaded do to errors

Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.07.2025 - 13:10