Home > php教程 > php手册 > Using Standford Moss code duplication checking system in PHP projects

Using Standford Moss code duplication checking system in PHP projects

WBOY
Release: 2016-08-04 08:53:12
Original
2752 people have browsed it

The Standford Moss system is Stanford University's famous code duplication checking system. It can find out which code submitted by students is plagiarized from others, thereby rejecting the submission results. It is open to anyone who wants to use the system, so how to use it in PHP projects?

  1. Download Moss’s PHP file moss.php

    You can visit https://github.com/Phhere/MOSS-PHP to download moss.php and put it in your third-party extension library

  2. Use moss.php

    With the sample code below, you can simply do a small Moss test

include("moss.php");
$userid = ""; // Enter your MOSS userid
$moss = new MOSS($userid);
$moss->setLanguage('java' );
$moss->addByWildcard('test/*');
$moss->addBaseFile('Example.java');
$moss->setCommentString("This is a test");
print_r ($moss->send());
?>

This code uses moss.php to complete Java code duplication checking. Unfortunately, $userid is required.

3. Get userid

Since it is an open system, there is a way to obtain its account, and that is to send an email.

Send an email to moss@moss.stanford.edu and include

registeruser
mail Your email address (may be used as userid)

The next step is to wait for a reply. With userid, you can happily use Moss.

This article was first published on Dingqiu.com, please indicate the source when reprinting

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template