Contact

Besides using the contact form you can also use:

Code

Here are some of my most used functions, I will be putting up a download for my core PHP class that I use as soon as I complete it.

I am providing these scripts free of charge, but I am in no way responsible for any damages that may be caused. That being said I have used these scripts many times, and have had no adverse effects.

Your screen is small! This may make the code below look incorrect. ×
Get Classes

This function will require all of the files from a specific folder with a specific prefix. This is great if you want your users to be able to add modules or classes to your script

  1. function getclass($dir = "includes/", $pref = "class_", $suff = ".php")
  2. {
  3.     $this->included = array();
  4.     if (!file_exists($dir)) {
  5.         echo "<p>Directory not found.</p>";
  6.     }
  7.     foreach (scandir($dir) as $file) {
  8.         if (!in_array($file, $this->included) && strtolower(substr($file, 0, strlen($pref))) ==
  9.             $pref && strtolower(substr($file, 0 - strlen($suff))) == $suff) {
  10.                 require ($dir . $file);
  11.                 $this->included[] = $dir . $file;
  12.         }
  13.     }
  14. }

Usage:

  1. /*
  2. Default settings.
  3. Will require all files in the includes/ directory with the prefix of: class_ and the suffix of:
  4. .php
  5. */
  6. getclass();
  7.  
  8. /*
  9. Manually set settings.
  10. Will require all files in the modules/ directory with the prefix of: mod_ and the suffix of:
  11. .class.php
  12. */
  13. getclass("modules/", "mod_", ".class.php")

Contact Me

Want me to work for you? Something wrong with my website?

Use the contact form below and I will respond right away!



I am currently not accepting new clients. Sorry.

×

PHP 5

HTML5 Powered with CSS3 / Styling

jQuery