Koozali.org: home of the SME Server

help to config php config for file upload

Offline mgb

  • *****
  • 558
  • +0/-0
help to config php config for file upload
« on: March 04, 2008, 04:06:40 PM »
http://217.194.194.156/up/
<?php
if ($file1 !== "")
{
   move_uploaded_file( $file1 , "uploads/".$file1_name );
      print "ok  , <a href=\"uploads/".$file1_name."\">uploads/".$file1_name."</
      }else{
         print "no ";
         }
?>
mkdir .../html/up/uploads
chmod 777 -R ./uploads
problem. Not things like "I can't upload" or "It doesn't work"


log
 last message repeated 6 times
Mar  4 16:45:57 mail httpd: PHP Parse error:  parse error, unexpected '}' in /home/e-smith/files/ibays/Primary/html/up/upload.php on line 4
Mar  4 16:58:08 mail httpd: PHP Parse error:  parse error, unexpected T_STRING in /home/e-smith/files/ibays/Primary/html/up/upload.php on line 7

log httpd
POST /up/upload.php HTTP/1.1" 200 - "http://mail.makif.omer.k12.il/up/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
makif.omer.k12.il 192.168.183.2 - - [04/Mar/2008:16:58:30 +0200] "POST /up/upload.php HTTP/1.1" 200 - "http://mail.makif.omer.k12.il/up/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
makif.omer.k12.il 192.168.183.2 - - [04/Mar/2008:16:58:39 +0200] "GET /server-manager/cgi-bin/viewlogfiles?"


log
"POST /server-manager/cgi-bin/viewlogfiles HTTP/1.1" 200 478707 "https://mail/server-manager/cgi-bin/viewlogfiles" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
makif.omer.k12.il 192.168.183.2 - - [04/Mar/2008:17:02:09 +0200] "GET /server-common/css/sme_core.css HTTP/1.1" 304 - "https://mail/server-manager/cgi-bin/viewlogfiles" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
makif.omer.k12.il 192.168.183.2 - - [04/Mar/2008:17:02:09 +0200] "
Thanks all for helping
Skype yosii2009

Offline ste1986

  • 3
  • +0/-0
Re: help to config php config for file upload
« Reply #1 on: March 04, 2008, 04:18:53 PM »
Quote
print "ok  , <a href=\"uploads/".$file1_name."\">uploads/".$file1_name."</

missing the following for a start?
Code: [Select]
a>";

Offline mgb

  • *****
  • 558
  • +0/-0
Re: help to config php config for file upload
« Reply #2 on: March 05, 2008, 07:29:45 AM »
ok
?<?php
if ($file1 !== "")
{
   move_uploaded_file( $file1 , "uploads/".$file1_name );

   print "ok  , <a href=\"uploads/".$file1_name."\">
   uploads/".$file1_name."</a>";

               }else{
                print "no ";
                 }
                 ?>
problem.  "I can't upload" or "It doesn't work"
print ok can't upload is print ok doesn't "ok" is "no"
Thanks all for helping
Skype yosii2009