add_bms.php
来自「php源码 php源码参考」· PHP 代码 · 共 39 行
PHP
39 行
<?php require_once('bookmark_fns.php'); session_start(); //create short variable name $new_url = $_POST['new_url']; do_html_header('Adding bookmarks'); try { check_valid_user(); if (!filled_out($_POST)) { throw new Exception('Form not completely filled out.'); } // check URL format if (strstr($new_url, 'http://')===false) $new_url = 'http://'.$new_url; // check URL is valid if (!(@fopen($new_url, 'r'))) throw new Exception('Not a valid URL.'); // try to add bm add_bm($new_url); echo 'Bookmark added.'; // get the bookmarks this user has saved if ($url_array = get_user_urls($_SESSION['valid_user'])) display_user_urls($url_array); } catch (Exception $e) { echo $e->getMessage(); } display_user_menu(); do_html_footer();?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?