Looks like you're jumping straight in at the deep end then, by using classes.
Absolute paths in your script e.g. pointing to
http://domain.com/script.php will work regardless of where the script is being hosted (locally or on the server) as it points directly to the file.
If you used a link to /script.php on your server it would equate to
http://domain.com/script.php whereas on your desktop or root of your hard drive locally (depending what folder(s) the script was stored in locally).
If you didn't know about relative and absolute linking, you may be trying to do too much too early on in your php learning curve..
Ben