Dreamweaver production based on WordPress message of this III

Source: Internet
Author: User
Tags header log php and dreamweaver wordpress login

Although said in Dreamweaver tailor-made WordPress message Board (ii) this one, let the message board backstage account with the WordPress account share, but the part of the login, or individual login, so feel still some small trouble, so prunes suddenly thought, If you can get WordPress has logged in, that will be the son just log into a good, so the internet Google a bit, ha ~ Indeed can also, so prunes it and message board integration, let WordPress login, you can directly edit the message, And also put del.php into the installation of protection, in case there is a person directly in the back to hit del.php? Id=xxx, you can delete the message directly, so now if not logged in, the input del.php is unable to perform any action drop!

To obtain whether WordPress has been logged in:

Step1

Add a PHP page and save it as wp_login.php and enter the syntax below.

wp_login.php

<?php
require (".. /wp-blog-header.php ");
if (is_user_logged_in ()) {?>
	has been logged into
	the <br> <a href= "<?php Echo Wp_logout_url ());? > "> Logout </a>
<?php} else {?>
   has not logged into
<?php}?>

Step2

Open the browser test, if WordPress does not log in, the wp_login.php will show the message has not been logged in, with this concept, you can share this login account.

Del.php Join Login Verification:

Step3

Open del.php Find if (is_user_logged_in ()) {, pull to the bottom of the? "Add }else{Header (sprintf (" Location:index.php "));



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.