我对PHP语言很陌生,为了教育目的下载了“ClassifiedAdLister”。我的问题是元描述限制,我希望我的元描述字符限制160,而不是完整的描述张贴在描述字段。
如需进一步参考,请访问这里http://sujoonbiswas.epizy.com/classi/。
源代码视图-来源:http://sujoonbiswas.epizy.com/classi/listing-hi-this-is-0.html
电流码
<meta name="description" content="This My First Post Please Read My Post Care Fully, This Is SEO Friendly Template
One
Two
Three
Sultan Shah - SEO Guru
Hello Friwnds How Are You
Firstname
Lastname
Email
John
Doe
john@example.com
Mary
Moe
mary@example.com
July
Dooley
july@example.com
"/>
寻找
<meta name="description" content="This My First Post Please Read My Post Care Fully, This Is SEO Friendly Template"/>
字符限制160
也可以在URL中寻找完整的标题,而不是三个单词。
当前URL http://sujoonbiswas.epizy.com/classi/listing-hi-this-is-0.html
寻找 http://sujoonbiswas.epizy.com/classi/listing-hi-this-is-sultan-shah-your-seo-guru-0.html
您可以在这里找到原始脚本,https://www.netartmedia.net/adlister
问候
发布于 2020-06-20 19:54:47
您可以使用php的substr函数来限制字符串。
$your_string = "A long String";
$start = 0 //starting character
$length = 50 //Desired length
$limited_string = substr($your_string,$start,$length);
https://stackoverflow.com/questions/62490886
复制相似问题