當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Diff::toHTML方法代碼示例

本文整理匯總了PHP中Diff::toHTML方法的典型用法代碼示例。如果您正苦於以下問題:PHP Diff::toHTML方法的具體用法?PHP Diff::toHTML怎麽用?PHP Diff::toHTML使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Diff的用法示例。


在下文中一共展示了Diff::toHTML方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: run3

    public function run3()
    {
        Qdmvc::loadHelper('class.Diff');
        $diff = Diff::compare('Ngay do', 'Ngay mua', true);
        echo Diff::toHTML($diff, '');
        return;
        foreach ($diff as $item) {
            if ($item[1] == Diff::DELETED) {
                echo $item[0];
            }
        }
        echo '<br>';
        foreach ($diff as $item) {
            if ($item[1] == Diff::INSERTED) {
                echo $item[0];
            }
        }
        ?>


        <?php 
    }
開發者ID:quocdunginfo,項目名稱:qdmvc_vns2015,代碼行數:22,代碼來源:class.php

示例2: create_file

                                 }
                                 echo "-----------------Diff show me the differ : ------------------\n";
                                 $originalOPTB_WOCFile = ORIGIN_FILE_PATH . $path_parts['filename'] . '-objectcode.txt';
                                 if (file_exists($originalOPTB_WOCFile)) {
                                     $diffOPTB_WOC = Diff::compareFiles($originalOPTB_WOCFile, $OPTB_WOCtxtFile);
                                     echo Diff::toString($diffOPTB_WOC);
                                     create_file(RESULT_PATH . $OUTPUT_LOG_PREFIX . "diff-OPTB_WOC.html", Diff::toHTML($diffOPTB_WOC));
                                     echo "\n";
                                 } else {
                                     echo $originalOPTB_WOCFile . "\n" . 'do not exist' . "\n";
                                 }
                                 $orignalObjectPFile = ORIGIN_FILE_PATH . $path_parts['filename'] . '-objectprogram.txt';
                                 if (file_exists($orignalObjectPFile)) {
                                     $diffObjectP = Diff::compareFiles($orignalObjectPFile, $obectProgramTxtFile);
                                     echo Diff::toString($diffObjectP);
                                     create_file(RESULT_PATH . $OUTPUT_LOG_PREFIX . "diff-ObjectProgram.html", Diff::toHTML($diffObjectP));
                                     echo "\n";
                                 } else {
                                     echo $orignalObjectPFile . "\n" . 'do not exist' . "\n";
                                 }
                                 echo "-------------------------Diff end ----------------------------\n";
                                 compare_array_in_html_js(RESULT_PATH . $OUTPUT_LOG_PREFIX . "compare_html_js.html", $OPTB_WOC, $orignalCode, "Compare Array", false);
                             }
                             ## end ## print out OPTB
                         }
                     }
                 }
             }
         }
     }
 }
開發者ID:BrokenPen,項目名稱:SIC-XE-Assembler,代碼行數:31,代碼來源:sic.php


注:本文中的Diff::toHTML方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。