当前位置: 首页>>代码示例>>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;未经允许,请勿转载。