npsari Posted November 2, 2007 Share Posted November 2, 2007 Hi guys I have my images in a folder called h-images i.e. www.mysite.com/h-images/ I link to my images simply by <IMG src="/h-images/1.gif" border="0"> I have 100 webpages, and increasing I am worried that one day, whoever is in change! might decide that folders can not contain - So, i will have to change my whole pages because of that is this possible that one day in the future, folders must not contain - Quote Link to comment https://forums.phpfreaks.com/topic/75831-solved-should-i-be-worried/ Share on other sites More sharing options...
Dragen Posted November 2, 2007 Share Posted November 2, 2007 They shouldn't anyway. To be compliant with all browsers you should never include a - in a filename. There are several other characters as well, such as spaces, @, $ etc. I'd advise replacing them with _ which is fully compatible. Quote Link to comment https://forums.phpfreaks.com/topic/75831-solved-should-i-be-worried/#findComment-383802 Share on other sites More sharing options...
marcus Posted November 2, 2007 Share Posted November 2, 2007 What you could do is just set up a global system that tells you where your folder points. You can use .htaccess or a method of php to solve this. # php $dash_switch = 1; $folder = ($dash_switch == 1) ? "himages" : "h-images"; # if 1 folder = himages ;;; no hyphens # if 0 folder = h-images ;; hyphens. .htaccess wise RewriteEngine On RewriteRule ^/himages/([^*]*).gif$ /h-images/$1.gif [L] # or an opposite way RewriteRule ^/h-images/([^*]*).gif$ /himages/$1.gif [L] Quote Link to comment https://forums.phpfreaks.com/topic/75831-solved-should-i-be-worried/#findComment-383804 Share on other sites More sharing options...
revraz Posted November 2, 2007 Share Posted November 2, 2007 "&" is also a big no no for a filename character. Quote Link to comment https://forums.phpfreaks.com/topic/75831-solved-should-i-be-worried/#findComment-383807 Share on other sites More sharing options...
phpSensei Posted November 2, 2007 Share Posted November 2, 2007 We are fine with the current names on our servers, and URL addresses. It won't happen, its nothing to worry about... Quote Link to comment https://forums.phpfreaks.com/topic/75831-solved-should-i-be-worried/#findComment-383810 Share on other sites More sharing options...
otuatail Posted November 2, 2007 Share Posted November 2, 2007 This could be turned around. If you made a new folder and copied all the images to it. Then using a basic editor like notepad (I have to because php designer dosn't work for me here). Open each one in notebad and do a search replace. It would take time. but when done delete the old folder. Pay some kid a few quid to do it. Desmond. Quote Link to comment https://forums.phpfreaks.com/topic/75831-solved-should-i-be-worried/#findComment-383813 Share on other sites More sharing options...
marcus Posted November 2, 2007 Share Posted November 2, 2007 What's wrong with Notepad? Notepad is pure original, I can code just fine in it Ctrl + H. Or you could just use rename and move the files there. Quote Link to comment https://forums.phpfreaks.com/topic/75831-solved-should-i-be-worried/#findComment-383815 Share on other sites More sharing options...
npsari Posted November 2, 2007 Author Share Posted November 2, 2007 ohh, thanks well, i can see there are many ways of doing it yep, i think ill propably edit all my files with notepad and make another folder name (images) iam lucky i only have only about 60 pages now or less actually Quote Link to comment https://forums.phpfreaks.com/topic/75831-solved-should-i-be-worried/#findComment-383827 Share on other sites More sharing options...
marcus Posted November 2, 2007 Share Posted November 2, 2007 I have 100 webpages, and increasing 30 !== 100 Quote Link to comment https://forums.phpfreaks.com/topic/75831-solved-should-i-be-worried/#findComment-383829 Share on other sites More sharing options...
npsari Posted November 2, 2007 Author Share Posted November 2, 2007 lol, yes, cus some pages does not have any images should have said around 50, not sure exactly but they are quite many Quote Link to comment https://forums.phpfreaks.com/topic/75831-solved-should-i-be-worried/#findComment-383832 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.