Mklib php is a set of libraries created to make
building web applications with PHP easier. Features such as processing
data before inserting into a database or formatting date/time strings
for display.
PHP : mklib.php
mklib.php is a set of libraries created to make building
web applications with PHP easier. Common functions I use over-and-over
again are collected and put in these libraries.
Such as processing data before inserting into a
database or formatting date/time strings for display.
These libraries should work with both PHP3 and PHP4, but
I have moved up to PHP4 for everything and thus only test there.
Latest Versions:
-
General Functions:mklib.php 0.4.3 Last Updated: 2001-8-22
-
Date/Time Functions:mk datetime.php0.1.0 Last Updated: 2001-02-07
Documentation
Installing and Using
Assuming you have PHP installed and running properly. To use the library
all you need to do is "include" or "require" it in your script.
Download the library using the above link, you may want to rename
it to "mklib.php" Move this file to somewhere your web server can
read it. Initially you can put it in the same directory as your
script. If it is in the same directory as your code, use the following
code to include it in your page.
<?
require "./mklib.php";
?>
A few things to think about.
- If you have set your include directory
in your "php.ini" file then the include/require command starts looking
there first, which is why the "./" precedes the file name.
- The path specified in the include is your file system path, it
has nothing to do with your web server. So you can use a full
path such as "/usr/local/include/mklib.php"
- You may not want to store the library in the application
directory. I usually place mine one level up from all my application
directories. That way each application just goes out one level and
reads the same library, using "../mklib.php"
I'm still working on creating documentation of all the functions.
For now look at the source code of the library or the example/test page below.
There are comments in the source code of both.
|