本文整理匯總了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';
}
}
}
}