本文整理匯總了PHP中Projects::updateProjectField方法的典型用法代碼示例。如果您正苦於以下問題:PHP Projects::updateProjectField方法的具體用法?PHP Projects::updateProjectField怎麽用?PHP Projects::updateProjectField使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Projects
的用法示例。
在下文中一共展示了Projects::updateProjectField方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Projects
<?php
require_once "../config.inc.php";
$uid = $_REQUEST['id'];
$info = $_REQUEST['info'];
$field_name = $_REQUEST['field_name'];
$db = Database::obtain(DB_SERVER, DB_USER, DB_PASS, DB_DATABASE);
$db->connect();
$p = new Projects('member', BASE_DOMAIN);
$update = $p->updateProjectField($uid, $info, $field_name);
示例2: Projects
}
if (!empty($_FILES['bg_img']['name'])) {
$bg_file = $_FILES['bg_img']['name'];
$bg_temp_file = $_FILES['bg_img']['tmp_name'];
} else {
$bg_file = "";
}
$upload_dir = '/projects_img/';
if (!empty($bg_file)) {
//process bg
$p = new Projects('member', BASE_DOMAIN);
$upload_file = $p->uploader($bg_file, $bg_temp_file, $upload_dir);
$update = $p->updateProjectField($uid, $bg_file, 'bg_img');
}
if (!empty($vertical_file)) {
//process vertical
$p = new Projects('member', BASE_DOMAIN);
$upload_file = $p->uploader($vertical_file, $vertical_temp_file, $upload_dir);
$update = $p->updateProjectField($uid, $vertical_file, 'vertical_img');
}
} elseif ($mode === "categories") {
$file = $_FILES['cat_file']['name'];
$temp_file = $_FILES['cat_file']['tmp_name'];
$uid = $_REQUEST['cat_uid'];
$upload_dir = '/projects_img/';
$p = new Projects('member', BASE_DOMAIN);
$upload_file = $p->uploader($file, $temp_file, $upload_dir);
$update = $p->updateCategoryField($uid, $file, 'icon');
} else {
//nothing
}