class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
There used plugin Smarty templating engine. Here is his connection class:
// important so the TinyMVC and Smarty autoloaders work together!
define('SMARTY_SPL_AUTOLOAD', 1);
// require the Smarty class
require('libs/smarty/Smarty.class.php');
class TinyMVC_Library_Smarty Extends Smarty {
function __construct() {
parent::__construct();
$this->setTemplateDir(array('tpl/site/','tpl/admin/'));
$this->setCompileDir('tpl_c/');
$this->setConfigDir('tinymvc/myapp/configs/');
$this->configLoad('site.conf');
$this->configLoad('admin.conf');
$tmvc = tmvc::instance();
}
}
So I connected the class to work with the mail. But I do not know how to connect your class. When it is initialized once specified file. If there was a feature where you can specify the file after initialization, it would simplify the work in this case.Reply
require('libs/class.upload.php');
class TinyMVC_Library_Upload Extends upload {
function __construct() {
parent::__construct();
$tmvc = tmvc::instance();
}
}
now produces an error Error: E_WARNING Message: Missing argument 1 for upload::upload(), called in /home/otdc/domains/otdc.ru/public_html/paraavis/tinymvc/myfiles/plugins/tinymvc_library_upload.php on line 8 and defined File: /home/otdc/domains/otdc.ru/public_html/paraavis/libs/class.upload.php Line: 2573Reply
So I connected the class to work with the mail. But I do not know how to connect your class. When it is initialized once specified file. If there was a feature where you can specify the file after initialization, it would simplify the work in this case.
now produces an error
Error: E_WARNING
Message: Missing argument 1 for upload::upload(), called in /home/otdc/domains/otdc.ru/public_html/paraavis/tinymvc/myfiles/plugins/tinymvc_library_upload.php on line 8 and defined
File: /home/otdc/domains/otdc.ru/public_html/paraavis/libs/class.upload.php
Line: 2573
Everything works. :)