本文整理汇总了PHP中ImageHelper::upload方法的典型用法代码示例。如果您正苦于以下问题:PHP ImageHelper::upload方法的具体用法?PHP ImageHelper::upload怎么用?PHP ImageHelper::upload使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ImageHelper
的用法示例。
在下文中一共展示了ImageHelper::upload方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: handleFileUpload
/**
* Override parent
*/
function handleFileUpload($fileParameters, $id)
{
$filename = $this->fileDefaultName;
if (array_key_exists($this->parameterFile, $fileParameters) and array_key_exists('name', $fileParameters[$this->parameterFile]) and $fileParameters[$this->parameterFile]['name'] != '') {
$imageHelper = new ImageHelper();
$filename = $imageHelper->upload($this->fileBasename, $id, $fileParameters[$this->parameterFile]);
/*if ($filepath != "") {
$imageHelper = new SimpleImage();
$imageHelper->load($filepath);
$imageHelper->resize(100,100);
$imageHelper->save('../img/news/News-".$id."100x100.png');
}*/
}
return $filename;
}
示例2: post_uploadPicture
public function post_uploadPicture()
{
$uuid = Input::get("uuid");
$profile = Input::get("profile") ? 1 : 0;
$this->file = Input::file("foto");
$image = new ImageHelper();
$userInfo = array("uuid" => $uuid, "profile" => $profile);
$image->upload($this->file, "uploads/user/", $userInfo);
if ($image) {
return Redirect::to("/");
}
}
示例3: post_uploadPicture
public function post_uploadPicture()
{
$uuid = Input::get("uuid");
$own = Input::get("own");
$is_profile = Input::get("is_profile") ? Input::get("is_profile") : 0;
$this->file = Input::file("foto");
$image = new ImageHelper();
$userInfo = array("uuid" => $uuid, "profile" => $is_profile);
$image->upload($this->file, "uploads/pet/", $userInfo);
if ($image) {
return Redirect::to("/pet/mascota-profile/" . $own . "/" . $uuid);
}
}
示例4: handleFileUpload
/**
* Override parent
*/
function handleFileUpload($fileParameters, $id)
{
$filename = $this->fileDefaultName;
if (array_key_exists($this->parameterFile, $_FILES) and array_key_exists('name', $_FILES[$this->parameterFile]) and $_FILES[$this->parameterFile]['name'] != '') {
$fileHelper = new ImageHelper();
$filename = $fileHelper->upload($this->fileBasename, $id, $_FILES[$this->parameterFile]);
}
return $filename;
}