1. Setting your custom options in application.ini
Suppose you want to store the uploaded files to /data/uploads , and access them via http://youhost/uploads/thefilename
Here's an Example:
;; where to store user uploaded files. upload.savePath = "/data/uploads" ;; the uri access these files. upload.uriMap = "/uploads"
2. How to get these setting
;; in Bootstrap.php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
// other _initXXX
protected function _initUpload() {
$uploadOptions = $this->getOption('upload');
var_dump($uploadOptions);
}
}
you will see:
array 'savePath' => string '/data/uploads' (length=13) 'uriMap' => string '/uploads' (length=8)
Date: 2011-12-30 01:05:22 and last modified: 2012-01-14 23:04:39
Recent entries:
- Emacs rainbow mode
- Squirm a url rewriter for squid
- How to use rsync for transferring files over ssh
- Vide: GRE tunnel
- Video: how to install freebsd
- Video: Install zend framework
- Video: Install Window7 from network
- Install Window7 from a PXE Boot server (Linux/FreeBSD)
- Create GRE tunnel with FreeBSD8
- What's cooking for FreeBSD 9