Category Archives: PHP

  • Using query strings in CodeIgniter

    View Comments
    CodeIgniter logo

    CodeIgniter is a great framework for PHP development, and part of it’s greatness is in it’s URL scheme. However, the URL scheme take a lot of getting used to, especially when you want to accomplish things that, while trivial before, become more difficult using CodeIgniter. One of these things is the use of query strings. By default, CodeIgniter may ignore your query strings, causing your $_GET superglobal array to be empty. Luckily, there is a fix.

    Read More »
    Did you like this? Share it:
  • How to use delimiters other than ampersands in URLs

    View Comments

    I recently came across the idea of using different formatting for URLs. By this, I mean doing things such as omitting the question mark before the query string or using a character other than the ampersand to delimit the variables in the query string. This idea is potentially golden. I understand that there are programmers who feel that the standards should be upheld at all times, including when building URLs. However, I also understand that short, readable URLs are ideal and being able to build the URL as you please can help you towards that goal.

    Read More »
    Did you like this? Share it:
  • PHP scripts using __FILE__ break when they are moved

    View Comments
    magic constants in the php manual

    The __FILE__ magic constant contains the full path to the PHP script that it is being used in. The path used is local, not remote. Local paths are meant to be used when dealing with other files in the file system, such as when using the include, include_once, require, and require_once directives, and when opening, editing, and saving files on the server. Since the path on every server is going to be different, and since it’s a value that you expect the average user to be unaware of, using the __FILE__ magic constant allows an application to learn the path without requiring the user to learn it, first. But, once a file using the __FILE__ magic constant is moved, difficulties arise.

    Read More »
    Did you like this? Share it:
  • X-Cart 4.3 to 4.4

    View Comments
    x-cart dashboard

    One of the web development companies that I program websites for has a thing for using X-Cart for their clients in need of e-commerce. Being me, I prefer to use the latest version of any application that I make use of. The company that I work for had a particular outdated version that they preferred, but I convinced them to switch to the newest version, at least for their newer clients. Sadly, that decision has proven to be a bit more difficult than I had hoped.

    Read More »
    Did you like this? Share it: