FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationFTP Help

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 Dev Shed Forums Sponsor:
  #1  
Old November 12th, 2002, 12:06 PM
Freddyfiasko's Avatar
Freddyfiasko Freddyfiasko is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Norway
Posts: 57 Freddyfiasko User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 33 sec
Reputation Power: 7
Question PHP & FTP - whitespaces in filename = ERROR...why?

When I try to upload a file with my php/ftp-script, and the filename contains whitespaces the upload fails....


Any sugguestions for a solution to that?


Freddy...

Reply With Quote
  #2  
Old November 12th, 2002, 12:18 PM
Tzicha's Avatar
Tzicha Tzicha is offline
Here, not there
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 312 Tzicha User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 26 m 36 sec
Reputation Power: 7
  • Replace white spaces with underscores('_')
  • Capitalize the first letter of each word
Don't use white spaces in file names, it simplifies life.

Reply With Quote
  #3  
Old November 12th, 2002, 01:12 PM
hedge hedge is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2002
Posts: 692 hedge User rank is Sergeant (500 - 2000 Reputation Level)hedge User rank is Sergeant (500 - 2000 Reputation Level)hedge User rank is Sergeant (500 - 2000 Reputation Level)hedge User rank is Sergeant (500 - 2000 Reputation Level)hedge User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 Days 22 h 25 m 53 sec
Reputation Power: 19
Have you tried putting the name of the file in quotes?

Reply With Quote
  #4  
Old November 12th, 2002, 01:14 PM
Freddyfiasko's Avatar
Freddyfiasko Freddyfiasko is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Norway
Posts: 57 Freddyfiasko User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 33 sec
Reputation Power: 7
Ok....but the file with whitespaces is on a remote computer and I can`t access that file and rename it. I`ve tried to rename the string that contains the remote filename to a string with "_" instead of whitespaces. Then I put that string into the ftp_put()-function..........but with no luck....


Any suggestions?`



Freddy....

Reply With Quote
  #5  
Old November 12th, 2002, 01:18 PM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,840 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Days 27 m 47 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
Is the remote a *nix type?
Try putting a slash '\' before the space, since spaces in unix filename cause bad things.

There is actually a rename command in ftp, as long as you have sufficient rights to do that.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > PHP & FTP - whitespaces in filename = ERROR...why?


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 2 hosted by Hostway