Archive for February, 2009

  • Parsing global variables through a function in PHP

    0

    I used to think that all variables in PHP went through functions as normal. It wasn’t until I actually needed to read a global variable from a function that I realised it only has it’s own local variables. Having said that, if you need to use variables from outside of a function it is easy enough to parse through global variables.

    » Read the rest of the entry..

  • Using variables in Javascript’s replace function.

    0

    Today I hit a snag when I wanted to use a variable in Javascript’s replace function. Of course Javascript isn’t as easy as PHP as in order to replace content from a string or variable it has to be a regular expression. Luckily there is an easy enough way to convert your variable into a regular expression perfect for sending through the javascript replace function.

    » Read the rest of the entry..

  • .htaccess: Disabling access to browse files on directories

    0

    Some web hosts (including mine up until recently) allow users to browse files on a particular directory on your website. Although this is handy for you in development to check if files have actually uploaded or whatever else. But of course you don’t want everyone else being able to browse through your files, thankfully there is a short code you can add to your .htaccess files which will block access to browsing these directories.

    » Read the rest of the entry..

  • .htaccess: redirecting no www. to www.

    0

    The .htaccess is a powerful tool when it comes to managing server-side actions. It is a common comment that sites that have both www.domain.com and domain.com can get penalised from search engines because they are seen as 2 different websites. Personally I think this theory is a bit silly and you’d think search engines such as google would be smarter than that. Never the less, site addresses should probably be consistent anyway. Using .htaccess you can redirect traffic that goes to domain.com to www.domain.com – thus fixing the search engine problem and making your domain consistant to all visitors.

    » Read the rest of the entry..

  • Long time no post

    0

    It has been a while since I have a had a chance to keep everyone up to date with solutions to common and uncommon problems and all the other goings on in the web world. There is 2 reasons for this, the main one is a web development business is booming as businesses prepare themselves for the foreseen “recession”. The second is I have released my first major website in Beta. It’s called NexTunes, and it is an Australian Social Music Network site, be sure to jump on at www.NexTunes.com.au and let me know your thoughts! I’d hoped to add new features to it by now however time is not on my side at the moment…

    » Read the rest of the entry..