Download .zip |
Info | Example | View files (6) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2014-12-30 (1 year ago) | Not yet rated by the users | Total: 228 This week: 1 | All time: 7,611 This week: 807 |
Version | License | PHP version | Categories | |||
mysql-image 1.0.0 | GNU General Publi... | 5.6 | PHP 5, Databases, Graphics |
Description | Author | ||||||||
This class can serve images added to a MySQL database table. Recommendations What is the best PHP upload files to database class? |
|
Facilitates the storage and delivery of small images via MySQL. This method is far faster than traditional methods, and potentially less error-prone when uploading images often.
all($con=false) List all images in the database
$con: An optional database connection (optimization)
returns an associative array of keys and types
exists($key, $con=false) Determine weather or not a given image exists
$key: The image's unique key
$con: An optional database connection (optimization)
returns boolean
display($key) Display a stored image - CALL BEFORE HEADERS ARE SENT
$key: The image's unique key
upload($file, $key=null) Store an image through upload - uses the $_FILES superglobal
$file: The URL key to search for a file
$key: An image to replace (optional)
returns false if the image could not be uploaded, the new unique key otherwise
remove($key) Remove a stored image
$key: The image's unique key
returns false if the image did not exist, true otherwise
add($data, $type) Store a new image
$data: the image's binary
$type: the image's format
returns the image's unique key, or false on failure
replace($key, $data, $type) Replace an existing image
$key: The image's unique key
$data: the image's binary
$type: the image's format
returns false on failure, true otherwise
Files |
File | Role | Description |
---|---|---|
config.php | Conf. | Configuration script |
example.php | Example | Example script |
install.sql | Data | Auxiliary data |
LICENSE | Lic. | License text |
readme.txt | Doc. | Documentation |
sqlimg.php | Class | Class source |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.