本文整理匯總了PHP中article::setId方法的典型用法代碼示例。如果您正苦於以下問題:PHP article::setId方法的具體用法?PHP article::setId怎麽用?PHP article::setId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類article
的用法示例。
在下文中一共展示了article::setId方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: article
<?php
if (isset($_REQUEST['i']) && !empty($_REQUEST['i'])) {
$object_article = new article();
$object_article->setId($_REQUEST['i']);
if ($object_article->delete()) {
print 'sucess';
} else {
print 'error';
}
} else {
print 'error';
}
示例2: article
</br>
<button type="submit" name="save" class="green"><?php
echo $language['save'];
?>
</button>
<button type="reset" name="cancel" class="red"><?php
echo $language['cancel'];
?>
</button>
</div>
</form>
<?php
} else {
$article = new article();
$article->setId(intval($_REQUEST['i']));
if (isset($_REQUEST['published'])) {
$_REQUEST['published'] = true;
} else {
$_REQUEST['published'] = false;
}
if (isset($_REQUEST['onhome'])) {
$_REQUEST['onhome'] = true;
} else {
$_REQUEST['onhome'] = false;
}
$article->setContent($_REQUEST['title_1'], $_REQUEST['content_1'], $_REQUEST['title_2'], $_REQUEST['content_2'], $_REQUEST['title_3'], $_REQUEST['content_3'], $_REQUEST['title_4'], $_REQUEST['content_4'], $_REQUEST['title_5'], $_REQUEST['content_5'], $_REQUEST['title_6'], $_REQUEST['content_6'], $_REQUEST['code']);
$article->setCategory($_REQUEST['category']);
$article->setDateUpdate();
$article->setPublished($_REQUEST['published']);
$article->setonHome($_REQUEST['onhome']);