Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
File uploading with PHP
#31
Okay:

Quote:I changed it to my needs, created an uploads directory (called "uploads") and CHMODed it to 777, and when I upload files, they aren't there.

Are you sure? Hit "refresh" in your FTP thingy. Other than that, check that the config variable $upload_path is correct (and with a slash).

Quote:And also, something weird: I have a page, upload.php, which says blah blah, you can upload files, and then it links to upscript.php, which is your script. Then, after I select a file to upload, and click Upload, it just takes me back to that upload.php page.

All the links on my page refer to "upload.php", so you'll have to change them. Like the form for example, is <form action="upload.php">, so you have to change that to upscript.
Reply
#32
You might want to use the phpinfo() function to make sure uploads are even enabled. On some servers running PHP, the upload function will appear to work even if it failed. phpinfo() will tell you if your server supports uploading. I don't know if you've already tried this or not, but if not,t hen try it. Smile

If all else fails. email me your scripts and I'll take a look at 'em and see if I can figure out what's wrong. Might just be something simple you're overlooking, but the probability that it's a server issue is relatively high.

Here's the code I used on my form for the prestige account:

Code:
print "<form action=\"ADMINISTRATIONuploadnewmodel2.php\" method=\"post\" enctype=\"multipart/form-data\">";
  print "Please select an image to upload for this model (you will be able to upload more later):<BR><input type=file name=userfile>";
  print "<input type=submit value=\"Upload this file\"></form>";
Note that this is HTML created in the PHP script itself rather than straight HTML, so don't cut/paste Wink but see if this small code example helps your code at all.
I'd knock on wood, but my desk is particle board.
Reply
#33
ping -f -c 1 adosorken@qbnews.com :lol:

Quote:And Oracle: Got it, thanks. I can use it, then? I'll credit you...

He's using that one, it works fine for me on my server: http://qbnz.com/upload.php

He's just changed the name to upscript.php so some of the links don't work, but I suspect that you're correct about his server disabling uploads.
Reply
#34
Quote:File_uploads=On
They're on.
And I figured out the problem: I renamed the file upload.php to upscript.php. But there is an upload.php as well.
Thanks, Oracle, Ado. Smile
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#35
Oracle: Tongue nice try but no banana Tongue
Zack: awesome Big Grin
I'd knock on wood, but my desk is particle board.
Reply
#36
If you want to take a look...
http://www.thegeekery.org/dev/
Click Uploads, etc. Don't actually upload anything though.
And btw, what do you think of the tagboard on the index page?
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#37
You might need to work on the colour of the links at the bottom of the upload thingy, when not hovered they're a little hard to read.

The tag board is cool Smile
Reply
#38
is t35.com support file uploading ???
Reply
#39
I doubt it. I haven't had expirience with them, but anything with a 250 KB size limit on admin-uploads, probably won't want other uploads.
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)