PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old August 6th, 2002, 03:16 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
uploading??

im trying to get an upload feature to work... nothing spectacular of course:

here's the code for the output of a form:

if ($superdat_name != "") {
copy("$superdat", "/usr/local/psa/home/vhosts/springfieldam.fiyer.com/httpdocs/upload/$superdat_name") or
die("Couldn't copy file.");

} else {
die("No input file specified.");
}

it wont upload tho! i dont know why. i get an error saying

Warning: open_basedir restriction in effect. File is in wrong directory in /usr/local/psa/home/vhosts/springfieldam.fiyer.com/httpdocs/do_upload.php on line 4

any suggestions?

Reply With Quote
  #2  
Old August 6th, 2002, 01:46 PM
jorgen jorgen is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Hardenberg, Holland<marquee>
Posts: 284 jorgen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: uploading??

The server has turned the Save_Mode on, so the function copy() won't work, instead of copy() use move_uploaded_file();

when you want to upload files be sure you use enctype="multipart/form-data" into the form-tag.

I.E.

<form method=post action=blaat.php enctype=multipart/form-data>
</form>

Reply With Quote
  #3  
Old August 7th, 2002, 09:12 AM
siteworkspro.com siteworkspro.com is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Sydney, Australia
Posts: 92 siteworkspro.com User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to siteworkspro.com Send a message via AIM to siteworkspro.com
RE: uploading??

try using $_FILE['superdat']['tempname']
$_FILE['superdat']['name']
$_FILE['superdat']['size']

etc...

Reply With Quote
  #4  
Old August 8th, 2002, 01:41 PM
jorgen jorgen is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Hardenberg, Holland<marquee>
Posts: 284 jorgen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: uploading??

Your solution won't work.
You can only use move_uploaded_file();

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > uploading??


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway