The install went mostly smooth with no issues. The only problem I ran across was that I installed it in the main directory instead of a sub directory. If I want the cutesy simple URL I have to use their htaccess file which actually affected several sub directories that host other websites of mine. Anyhow that created a mess and as I was trying to get around it by updating the htaccess file I realized that there was no way for me to get all four sites working they way I wanted it. I could swing 2 or 3 but since some were on sub domains it just wasn't working.
This is a workshop I hosted at the Art Institute International Minneapolis for students of any department that were interested in using PHP for their websites. As I instructed my students, this code should not be used on a production server until several security measures were added. For instructional use only.
PHP Authentication Workshop
By: James Taylor
Time for change again! Out with the old Wordpress site and in with this new Drupal CMS driven site. There was nothing wrong with the old site but I'd wanted to work with Drupal more before they release the upcoming version 7. Updating this in my spare time the current blue and white theme is temporary as I work on some custom art.
Some plans for include a new photo gallery, project management system, and mobile version of the site. Looking forward to all of this.
XML Dom for WoW Armory information scrape.
Loop through a directory displaying the files.
I’ve needed this a a few time, whether it was just to list a directory while limiting the output or putting files in a directory into an XML format. This short script can be built on to suit your needs. This particular script will do the following:
* Open the directory
* Loop through each file
* Use an echo in the loop displaying the directory and file names
* Close the directory when finished
The script:
<?
$dir = opendir('.');
while (false !== ($file = readdir($dir))) {
Connecting to a MySQL Database
One of the most important things about websites today is the ability for them to access dynamic information. Knowing how to connect to your database will enable you to write applications that deal directly with database information, and the possibilities are endless.
There are four bits of information that you will want to know when building your connection function. Name, login, password, and host. Below will be an example of code that I use often in applications.
<?php
//Insert your database information.
$db =”foobase”; //Database Name