本文整理汇总了PHP中CommonFunctions::basepath方法的典型用法代码示例。如果您正苦于以下问题:PHP CommonFunctions::basepath方法的具体用法?PHP CommonFunctions::basepath怎么用?PHP CommonFunctions::basepath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CommonFunctions
的用法示例。
在下文中一共展示了CommonFunctions::basepath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
public function save(Doctrine_Connection $conn = null)
{
$cls_commonfunction = new CommonFunctions();
$path = $cls_commonfunction->basepath();
$file = $_FILES;
if ($file['book_series']['name']['series_icon'] != '') {
if (move_uploaded_file($file['book_series']['tmp_name']['series_icon'], $path . "uploads/book_series/" . time() . "_" . $file['book_series']['name']['series_icon'])) {
$this->setSeriesIcon(time() . "_" . $file['book_series']['name']['series_icon']);
}
} else {
$this->getSeriesIcon("");
}
return parent::save($conn);
}
示例2: save
public function save(Doctrine_Connection $conn = null)
{
$cls_commonfunction = new CommonFunctions();
$path = $cls_commonfunction->basepath();
$file = $_FILES;
if ($file['avatar']['name']['avt_image'] != '') {
if (move_uploaded_file($file['avatar']['tmp_name']['avt_image'], $path . "uploads/avatar/" . time() . "_" . $file['avatar']['name']['avt_image'])) {
$this->setAvtImage(time() . "_" . $file['avatar']['name']['avt_image']);
}
} else {
$this->getAvtImage("");
}
return parent::save($conn);
}