Relative and Absolute Addresses

Author Topic: Relative and Absolute Addresses  (Read 810 times)

Offline chinmay.sahooTopic starter

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 2
  • Posts: 139
  • Karma: 0
    • No Addiction
Relative and Absolute Addresses
« on: 12-19-2015, 03:00:43 »
In the remainder of this chapter we will describe a number of functions that take relative addresses of fi les and/or directories as arguments. For completeness we should mention that absolute addresses are also permitted. For example we can refer to the fi le main.php in directory 'buildings' as /public_html/buildings/main.php, giving the full address starting at the root directory. However we do not recommend doing this. Using relative addresses such as ../buildings/main.php makes your scripts (and your entire website) far more portable. Should you ever move your website to a new server which uses slightly different standards or should your system administrator decide to  structure the directory structure of the site the absolute address of your home directory might change to say /web or /system/ public_html. This ought to be a minor change but if you have used absolute addresses you will need to search through every one of your PHP scripts and change every absolute address. By contrast if you have relative addresses you should not need to make any changes at all.


Related Topics

  Subject / Started by Replies Last post
14 Replies
Last post 07-17-2012, 21:14:46
by aamish66
0 Replies
Last post 09-06-2012, 23:09:51
by rajnagarvvip
0 Replies
Last post 10-20-2013, 06:37:15
by ptbrz86
0 Replies
Last post 03-03-2014, 02:24:16
by Aurimasm
0 Replies
Last post 12-19-2015, 02:58:15
by chinmay.sahoo