本文整理汇总了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
}