|
|
|
View Poll Results: Relative paths or fixed paths?
|
|
Relative
|
  
|
8 |
100.00% |
|
Fixed
|
  
|
0 |
0% |
 |
x10 Spammer
Join Date: Nov 2007
Posts: 3,139
Credits:
14,274
Location: #offtopic ;)
|
|
08-20-2008, 07:17 AM
|
|
Relative paths or fixed paths?
Just wondering if you prefer to use relative paths or fixed paths when designing websites, and whether you use fixed paths in PHP for includes/requires/fopens and stuff. It came to me when I was trying to move WordPress on my test PC to my x10Hosting account and discovered it uses fixed paths for everything  . I'm just gonna do a resinstall and put a few useful posts up, my blog was abandoned and full of crap anyway lol.
But anyway, relative or fixed paths?
I tend to use relative paths where possible because it's easier to move something around. If I need to use fixed ones, I have a variable somewhere which is easy to change and means I get the benefits of using relative ones.
-Luke.
__________________
No longer staff as of 28th November 2008
Just Discuss - forums about everything
Last edited by tnl2k7; 08-20-2008 at 07:19 AM.
|
|
|
|
VIP User
Join Date: Aug 2007
Posts: 210
Credits:
2,687
Location: Sweden
|
|
08-20-2008, 08:11 AM
|
|
Re: Relative paths or fixed paths?
I'd say relative as well, for the flexibility. Nothing breaks if I change addy
btw, for the wordpress stuff, it's easy to change, as it is actually stored in database as a variable (you set it in admin area stupid enough, blog url and homepage url). However you can edit it through phpmyadmin, in settings table there are two rows that handle the url of the blog. You need to change them both.
Last edited by LadyAnna; 08-20-2008 at 08:15 AM.
|
|
|
|
x10 Spammer
Join Date: Dec 2007
Posts: 2,664
Credits:
3,179
|
|
08-20-2008, 08:49 AM
|
|
Re: Relative paths or fixed paths?
I use relative paths. I've found it to be less of a hassle down the road when working with my websites. The only time I need to change a relative path is when I mass move content around.
__________________
THE SENTRY'S A SPY!
|
|
|
|
x10 Spammer
Join Date: Nov 2007
Posts: 3,139
Credits:
14,274
Location: #offtopic ;)
|
|
08-20-2008, 09:46 AM
|
|
Re: Relative paths or fixed paths?
Quote:
Originally Posted by LadyAnna
I'd say relative as well, for the flexibility. Nothing breaks if I change addy
btw, for the wordpress stuff, it's easy to change, as it is actually stored in database as a variable (you set it in admin area stupid enough, blog url and homepage url). However you can edit it through phpmyadmin, in settings table there are two rows that handle the url of the blog. You need to change them both.
|
Yes, but once you've changed that, any references to uploaded images are broken because they're fixed too. WordPress is an amazing software, but this is one thing that lets it down in my book. I've fixed it anyway, the site's back up with a new skin and some posts. Luckily there wasn't much in my old blog, most of it was announcements about issues with the arcade anyway. I just copied the 2 useful ones lol =P.
-Luke.
__________________
No longer staff as of 28th November 2008
Just Discuss - forums about everything
|
|
|
|
x10 Sophmore
Join Date: Apr 2008
Posts: 221
Credits:
4,808
Location: <between embed tags>me</>
|
|
08-20-2008, 11:23 AM
|
|
Re: Relative paths or fixed paths?
relative paths are always preferred bcoz you never know if there will be any changes on your directory, server, or the pale where data is placed
|
|
|
|
x10 Sophmore
Join Date: Jul 2008
Posts: 144
Credits:
1,416
|
|
08-20-2008, 12:40 PM
|
|
Re: Relative paths or fixed paths?
I always try to use relative paths instead of fixed paths to be able to move the root folder of place in another folder. I even created a script to modify the relative path when the include script is in a root folder and needs to get scripts in other folders, children and parent.
|
|
|
|
x10Hosting Member
Join Date: Feb 2008
Posts: 74
Credits:
1,162
|
|
08-20-2008, 02:40 PM
|
|
Re: Relative paths or fixed paths?
Definitely got to be relative, if I have to move host for whatever reason unless I use the same user name I'm stuffed, with over 400 files editing all the path files would be a right pain in the bum.
|
|
|
|
x10Hosting Member
Join Date: Aug 2008
Posts: 19
Credits:
371
|
|
08-23-2008, 02:16 AM
|
|
Re: Relative paths or fixed paths?
this was in HTML, but I usually used relative paths for the links to pages within my site and fixed only when linking to external sites. This meant that I could pull and save the entire site with layout on my computer and test it out before uploading it. Very useful when you are working with dial-up and limited hours per month of access.
|
|
|
|
x10 Sophmore
Join Date: Jan 2008
Posts: 162
Credits:
1,343
Location: Australia
|
|
08-23-2008, 02:26 AM
|
|
Re: Relative paths or fixed paths?
Relative paths, but if I must use fixed in a project it will be stored in a variable in one location - easy to change if need be.
|
|
|
|
x10 Lieutenant
Join Date: Nov 2007
Posts: 392
Credits:
5,201
Location: In front of a computer
|
|
08-23-2008, 12:19 PM
|
|
Re: Relative paths or fixed paths?
Well if im desining a site for someone i will try to use fixed paths just to smite them. hahaha. some times tey even pay you to fix your own bugs. where am i getting that crap from. I try to use reletive for my own things because why smite myself
__________________
--cowctcat Senior Mod
|
|
|
|
 |
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:34 PM.
Powered by vBulletin® Version 3.7.3 Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 RC7
Mortgage Calculator | Hsbc | MPAA | Myspace Proxy | Mortgage Calculator
| |