本文整理汇总了PHP中files::pull_image方法的典型用法代码示例。如果您正苦于以下问题:PHP files::pull_image方法的具体用法?PHP files::pull_image怎么用?PHP files::pull_image使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类files
的用法示例。
在下文中一共展示了files::pull_image方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Questions
$Question = new Questions();
$input = htmlspecialchars($_POST['inputquest']);
$usID = $user->data['user_id'];
if (strlen($_FILES['userfile']['name']) > 1) {
$file = new files();
$imageLocation = $file->upload($_FILES['userfile']['name'], $_FILES['userfile']['size'], $_FILES['userfile']['tmp_name'], $_FILES['userfile']['type']);
// add_question($eventId, $question, $a, $b, $c, $d, $e, $correct,$image, $type, $keywords, $userID)
if ($Question->add_question($_POST['event'], $input, NULL, NULL, NULL, NULL, NULL, NULL, $imageLocation, 4, $_POST['keywords'], $usID)) {
echo 'Question Added';
} else {
echo 'There was an error';
}
} else {
if (strlen($_POST['URL']) > 1) {
$file = new files();
$imageLocation = $file->pull_image($_POST['URL']);
// add_question($eventId,$question, $a, $b, $c, $d, $e, $correct,$image, $type, $keywords, $userID)
if ($Question->add_question($_POST['event'], $input, NULL, NULL, NULL, NULL, NULL, NULL, $imageLocation, 4, $_POST['keywords'], $usID)) {
echo 'Question Added';
} else {
echo 'There was an error';
}
} else {
if ($Question->add_question($_POST['event'], $input, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, $_POST['keywords'], $usID)) {
echo 'Question Added';
} else {
echo 'There was an error';
}
}
}
}