首先我们下载本次所需要的php不破坏单词截取子字符串类:
一:下载完成之后,解压php类文件到本地,接着创建一个新的php文件!
二:在新的文件中引入文件,调用该类:
<?php
include_once "jiequzfc.php";//引入类文件
//对字符串的截取处理
echo (snippet("this is not too long to run on the column on the left, perhaps, or perhaps yes, no idea") . "<br>");
echo (snippetwop("this is not too long to run on the column on the left, perhaps, or perhaps yes, no idea") . "<br>");
echo (snippetgreedy("this is not too long to run on the column on the left, perhaps, or perhaps yes, no idea"));三、运行这个文件,运行结果如下:

| 欢迎光临 一起源码网 (https://www.171739.xyz/) | Powered by Discuz! X3.3 |