The Internet Explained


Developing PHP5 code on a PHP4 server, that also has PHP5

.htaccess to run PHP5 on a server that defaults .php to PHP4, when your ultimate target is a PHP5 server.

.htaccess file

RewriteEngine   On
RewriteRule   ^index.php5$      - [L]
RewriteRule   ^exec.php$        - [L]
RewriteRule   ^(.*)\.php5?$     index.php5?page=$1
DirectoryIndex  index.php5

The advantage of this architecture is that since all the pages are delivered through index.php5, they are processed as PHP5, although they are named as .php.

Also - if you have a PHP5 application, you MAY be able to use the same approach, if you put PHP5 and PHP4 on the same server.

dojo validation

This is a dojo validation loop. Send it an array of input ids (with dojoTypes), and it will ensure they’re valid.

function checkValid(aValid)
        var i,e;
        for (i=0;i<aValid.length;i++)
                if (!e.readOnly)
                        if (typeof e.isValid != 'undefined')
                                if (!e.isValid())
                                        return false;
        return true;

PS - Visit with FireFox, not IE

Ini processing into javascript

echo '<pre>';
echo '</pre>';
echo '<hr />';
extract ($ini_array);
echo 'Database: '.$database.'<br />';

This is the beginning of an adventure - to use PHP to inject strings into javascript for AJAX applications. Multi-lingual, fast and efficient. More posts later. Will probably require Apache adjustments to run .js files through PHP, but that’s okay!!!