var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
php scripts cant locate filenames with spaces
Hi and good morning guys,
I have a fresh dedicated server that im currently configuring and needed a little help if I may ask.
The problem is that i'm having a file naming issue.
for example from the web I can access any file that does not have spaces of any type.
this works fine and my php script can locate it
But the problem is when I try to access a file that has spaces.
/music/The Eagles - Hotel California.mp3
my php script can't seem to locate any files like this with spaces but doesn't have a problem locating the files with no spaces.
I also took a look at the directory within shell. I did notice that files that have spaces are showing up in this formatt in shell.
#/home/~username/public_html/music/The\ Eagles\ -\ Hotel\ California.mp3
In shell , i'm assuming that unix/linux maybe adds a backslash before spaces. But when I FTP to this same directoy, the filename look normal and at windows standard.
how could I correctly access these types of files within my php scrits? or would I need to have all uploaded files renamed so that spaces are replaced with underscores maybe??
any help would be greatly appreciated!
If the script searches the local file system first then maybe you need to escape the name string so to be exactly like your OS displays it...
By flam316 in forum Programming Discussion
Last Post: 04-04-2011, 03:34 PM
By ytz991 in forum Hosting Security and Technology
Last Post: 12-03-2008, 12:43 PM
By ccole in forum Programming Discussion
Last Post: 06-14-2005, 10:50 AM
By matt2kjones in forum Programming Discussion
Last Post: 09-29-2003, 02:07 AM
By nogi in forum Hosting Security and Technology
Last Post: 02-24-2003, 08:32 PM