Home > Backend Development > PHP Tutorial > Shortcut to Clone a New Project_PHP Tutorial

Shortcut to Clone a New Project_PHP Tutorial

WBOY
Release: 2016-07-21 15:12:27
Original
1031 people have browsed it

Have you ever thought about how to quickly copy the most popular item and then modify it to become a new group purchase item?

Or when editing an old project, you want to save it as a new project instead of saving,

Look at the picture below, the red part

zuituclone

The specific development code (non-details) is as follows

Modify the template and add buttons

include/template/manage_team_edit.html

Add js to handle cloneteam function

function cloneteam()
{
document.getElementById('-user-form').action=”/manage/team/edit.php?clone=1″;
document.getElementById( '-user-form').submit();
}

Note clone=1

In addition, the template was modified to add several hidden contents in order to copy the image image1 image2 fields in the old project

Modify manage/team/edit.php

The original code is like this

zuit-clone-team1

Now the code is like this

zuit-clone-team2

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/326662.htmlTechArticleHave you ever thought about how to quickly copy the most boring project and then change it into a new group purchase project? Already? Or when editing an old project, you want to save it as a new project instead of...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template