我做了這個功能,以限制輸出字符串的長度, /* limit the lenght of the string */
function limit_length($content, $limit)
{
# strip all the html tags in the content
$output = strip_tags($content);
# count t
我寫了一個小bash腳本來嘗試獲取字符串的最後x個字符。 輸出給我一個「語法錯誤」: string: This is my string. I want THIS TEXT
length: 35
start: 26
expr: syntax error
text:
我敢肯定,這是相當簡單的,但我不能弄明白。任何人都可以指出我做錯了什麼?這是在SunOS上運行的。