Page 3 of 3
Re: About to uninstall Serendipity
Posted: Thu Mar 19, 2009 2:57 pm
by judebert
RedBaron wrote:I'm deep in code now ..
Whats the difference between the following:
require( dirname(__FILE__).'/function.php' )
and
include('./function.php')
Welcome to the exciting world of PHP coding!
I understand you've moved past this (and in fact, the site seems to be working out pretty well!), but I thought I would answer your question anyway just in case you were interested.
In PHP, the period is used to join two strings together. dirname(__FILE__) is the string indicating the directory the current file is running from. That might be something like "/www/mypath". So the first command would try to load up "/www/mypath/function.php", and die with an error message if it couldn't (that's what require() does).
In the second command, the period is inside the quotes. When you're talking about files, there are two special directories: "." and "..". "." means "the directory I'm in right now". ".." means "the directory just before this one". So that second command tries to load up function.php from the current directory. It might print an error, but the script would continue if it failed; that's the difference between include() and require().
Anyway. Glad you and Don got things working.
Re: About to uninstall Serendipity
Posted: Thu Mar 19, 2009 3:33 pm
by RedBaron
Wow that was a great explanation of the coding elements - "Alles Klar" as they say
Your previous post mentioned a .htaccess file - how do I create this file, where do I put it and how is it called.
Sorry again if that sounds a little "slow" of me - things are moving on apace on the server side .. finally got hold of a decent "now playing" plugin and its posting succesfully to sites such as twitter and facebook.
The linkback however says fuzzyfm.com (and not fuzzyfm.com/serendipity)
Currently I have included the following line in the default index.html file
<META HTTP-EQUIV="REFRESH" CONTENT="0;URL=
http://fuzzyfm.com/serendipity/">
but this is far from ideal even though I set the time to "0" (try it - its rubbish!)
Once again - all help in creating the .htaccess file gratefully appreciated ...
Trevor
Re: About to uninstall Serendipity
Posted: Thu Mar 19, 2009 3:41 pm
by Don Chambers
Trevor - I suggest you not worry about that redirect just yet.... that is easy to do, and can be done after your other issues.
Re: About to uninstall Serendipity
Posted: Thu Mar 19, 2009 3:57 pm
by RedBaron
Are you saying I have "issues"?
hehe
Re: About to uninstall Serendipity
Posted: Thu Mar 19, 2009 4:22 pm
by Don Chambers
RedBaron wrote:Are you saying I have "issues"?
hehe
Dude - we ALL have issues!!!

Re: About to uninstall Serendipity
Posted: Thu Mar 19, 2009 4:38 pm
by RedBaron
Don et al.
I definitely need that redirect today - (.htaccess) please .. OK. .. pretty please!
It doesnt look good for the discerning Radio listener, and the reloading page will make people nervous
I have money ... hehe
Re: About to uninstall Serendipity
Posted: Thu Mar 19, 2009 5:04 pm
by Don Chambers
redirect in place.
Re: About to uninstall Serendipity
Posted: Thu Mar 19, 2009 6:43 pm
by RedBaron
Don Chambers wrote:redirect in place.
You're a star DC!
