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


PHP ReStrLen函數代碼示例

本文整理匯總了PHP中ReStrLen函數的典型用法代碼示例。如果您正苦於以下問題:PHP ReStrLen函數的具體用法?PHP ReStrLen怎麽用?PHP ReStrLen使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


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

示例1: Info

function Info($cid = 0, $num = 0, $gourl = '')
{
    global $dosql;
    $contstr = '';
    $row = $dosql->GetOne("SELECT * FROM `#@__info` WHERE classid={$cid}");
    if (isset($row['content'])) {
        if (!empty($num)) {
            $contstr .= ReStrLen($row['content'], $num);
        } else {
            return GetContPage($row['content']);
        }
        if ($gourl != '') {
            $contstr .= ' <a href="' . $gourl . '">[更多>>]</a>';
        }
    } else {
        $contstr .= '網站資料更新中...';
    }
    return $contstr;
}
開發者ID:wtySk,項目名稱:github,代碼行數:19,代碼來源:func.class.php

示例2: while

    $sql .= " AND title LIKE '%{$keyword}%'";
}
$sql .= " order by id desc";
$dopage->GetPage($sql, 10);
while ($row = $dosql->GetArray()) {
    ?>
                	<tr>
                    	<td><input type="checkbox" name="checkid[]" id="checkid[]" value="<?php 
    echo $row['id'];
    ?>
" /></td>
                    	<td><img src="/<?php 
    echo $row['picurl'];
    ?>
" width="50" height="50"><span><?php 
    echo ReStrLen($row['title'], 16);
    ?>
</span></td>
                    	<td><?php 
    echo $row['salesprice'];
    ?>
</td>
                    	<td>
                        <?php 
    $flagarr = explode(',', $row['flag']);
    //var_dump($flagarr);
    if (in_array('t', $flagarr)) {
        echo '<a href="?action=flag&a=t&id=' . $row['id'] . '"><i class="sh_true"></i></a>';
    } else {
        echo '<a href="?action=flag&a=t&id=' . $row['id'] . '"><i class="sh_false"></i></a>';
    }
開發者ID:CQHanSa,項目名稱:lingang,代碼行數:31,代碼來源:goods.php

示例3: gethostbyname

		<h2 class="title">空間</h2>
		<ul class="status">
			<li>服務器名: <?php 
echo $_SERVER['SERVER_NAME'];
?>
 </li>
			<li>服務器IP: <?php 
echo gethostbyname($_SERVER['SERVER_NAME']) . ':' . $_SERVER['SERVER_PORT'];
?>
 </li>
			<li><span style="border-bottom:none;">服務器係統: <?php 
echo PHP_OS;
?>
</span></li>
			<li> 服務器版本: <?php 
echo ReStrLen($_SERVER['SERVER_SOFTWARE'], 12);
?>
</li>
			<li>PHP&amp;MySQL版本: <?php 
echo PHP_VERSION;
?>
&amp;<?php 
echo $dosql->GetVersion();
?>
</li>
			<li>POST提交內容限製: <?php 
echo get_cfg_var('post_max_size');
?>
</li>
			<li>腳本超時時間: <?php 
echo get_cfg_var('max_execution_time') . '秒';
開發者ID:CQHanSa,項目名稱:lingang,代碼行數:31,代碼來源:home_user.php

示例4: stripslashes

 if ($autothumb == 'true') {
     $cont_str = stripslashes($content);
     preg_match_all('/<[img|IMG].*?src=[\'|\\"](.*?(?:[\\.gif|\\.jpg|\\.png]))[\'|\\"].*?[\\/]?>/', $cont_str, $imgurl);
     //如果存在圖片
     if (isset($imgurl[1][0])) {
         $picurl = $imgurl[1][0];
         $picurl = substr($picurl, strpos($picurl, 'uploads/'));
     }
 }
 //自動提取內容到摘要
 if ($autodesc == 'true') {
     if (empty($autodescsize) or !intval($autodescsize)) {
         $autodescsize = 200;
     }
     $descstr = ClearHtml($content);
     $description = ReStrLen($descstr, $autodescsize);
 }
 //自動分頁
 if ($autopage == 'true') {
     $content = ContAutoPage($content, $autopagesize * 1024);
 }
 $posttime = GetMkTime($posttime);
 //自定義字段處理
 $fieldname = '';
 $fieldvalue = '';
 $fieldstr = '';
 $ids = GetDiyFieldCatePriv('1', $classid);
 if (!empty($ids)) {
     $dosql->Execute("SELECT * FROM `#@__diyfield` WHERE infotype=1 AND `id` IN ({$ids}) AND checkinfo=true ORDER BY orderid ASC");
     while ($row = $dosql->GetArray()) {
         $k = $row['fieldname'];
開發者ID:jsycwangwei,項目名稱:NJIT,代碼行數:31,代碼來源:infolist_save.php

示例5: ReStrLen

			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td height="33" colspan="2">軟件版本號: <span title="<?php 
echo $cfg_vertime;
?>
"><?php 
echo $cfg_vernum;
?>
</span></td>
				</tr>
				<tr>
					<td width="50%" height="33">服務器版本: <span title="<?php 
echo $_SERVER['SERVER_SOFTWARE'];
?>
"><?php 
echo ReStrLen($_SERVER['SERVER_SOFTWARE'], 7, '');
?>
</span></td>
					<td width="50%">操作係統: <?php 
echo PHP_OS;
?>
</td>
				</tr>
				<tr>
					<td height="33">PHP版本號: <?php 
echo PHP_VERSION;
?>
</td>
					<td>GDLibrary: <?php 
echo ShowResult(function_exists('imageline'));
?>
開發者ID:beijizhou,項目名稱:xinjiang001,代碼行數:31,代碼來源:home.php

示例6: ReStrLen

            $gourl = $row['linkurl'];
        }
    }
    ?>
				<li> <a href="<?php 
    echo $gourl;
    ?>
" class="img"><img src="<?php 
    echo $picurl;
    ?>
" /></a>
					<div class="info"><a href="<?php 
    echo $gourl;
    ?>
"><?php 
    echo ReStrLen($row['title'], 20);
    ?>
</a>
						<p><span class="fl">價格 <i class="lt"><?php 
    echo $row['marketprice'];
    ?>
</i><i><?php 
    echo $row['salesprice'];
    ?>
</i></span><span class="fr">瀏覽<i class="hits"><?php 
    echo $row['hits'];
    ?>
</i></span></p>
					</div>
				</li>
				<?php 
開發者ID:beijizhou,項目名稱:xinjiang001,代碼行數:31,代碼來源:goods.php

示例7: foreach

		<tr align="left" class="dataTr">
			<td height="36" class="firstCol"><input type="checkbox" name="checkid[]" id="checkid[]" value="<?php 
    echo $row['id'];
    ?>
" /></td>
			<td><?php 
    echo $row['id'];
    ?>
</td>
			<td><?php 
    echo $classname;
    ?>
</td>
			<?php 
    foreach ($fieldArr as $k => $v) {
        echo '<td>' . ReStrLen($row[$k], 20) . '</td>';
    }
    ?>
			<td class="number"><?php 
    echo GetDateTime($row['posttime']);
    ?>
</td>
			<td class="action endCol"><span><a href="modeldata_save.php?m=<?php 
    echo $m;
    ?>
&id=<?php 
    echo $row['id'];
    ?>
&action=check&checkinfo=<?php 
    echo $row['checkinfo'];
    ?>
開發者ID:beijizhou,項目名稱:xinjiang001,代碼行數:31,代碼來源:modeldata.php

示例8: isset

//社區選擇
if ($a == 'selectcommunity') {
    $v = isset($value) ? $value : '0';
    $selectval = isset($selectval) ? $selectval : '';
    $selectarr = explode(',', $selectval);
    if ($v > 0) {
        $str = '';
        $sql = "SELECT id,title FROM `#@__community` WHERE `address_city`={$v} and checkinfo='true' ORDER BY id desc";
        $dosql->Execute($sql);
        while ($row = $dosql->GetArray()) {
            if (in_array($row['id'], $selectarr)) {
                $select_on = 'class="on"';
            } else {
                $select_on = '';
            }
            $str .= '<li ' . $select_on . '><a href="javascript:;"; value="' . $row['id'] . '" title="' . $row['title'] . '">' . ReStrLen($row['title'], 10) . '</a></li>';
        }
        if ($str != '') {
            echo '<ul>' . $str . '</ul>';
        } else {
            echo '該區域暫時社區';
        }
    } else {
        echo '該區域暫時社區';
    }
    exit;
}
//社區列表
if ($a == 'communitylist') {
    $v = isset($value) ? $value : '';
    if ($v != '') {
開發者ID:CQHanSa,項目名稱:lingang,代碼行數:31,代碼來源:ajax.php

示例9: GetDateMk

    ?>
;font-weight:<?php 
    echo $row['boldval'];
    ?>
;"><?php 
    echo $row['title'];
    ?>
</a> <span> 日期:<small><?php 
    echo GetDateMk($row['posttime']);
    ?>
</small>點擊:<small><?php 
    echo $row['hits'];
    ?>
</small></span>
					<p class="desc"><?php 
    echo ReStrLen($row['description'], 90);
    ?>
</p>
					<div class="cl"></div>
				</li>
				<?php 
}
?>
			</ul>
			<?php 
echo $dopage->GetList();
?>
		</div>
	</div>
	<div class="TwoOfTwo">
		<?php 
開發者ID:beijizhou,項目名稱:xinjiang001,代碼行數:31,代碼來源:case.php

示例10: ReStrLen

						<article class="entry">
							<h2 class="entry-title">
								<a href="<?php 
    echo $gourl;
    ?>
"><?php 
    echo $row['title'];
    ?>
</a>
							</h2><!--/ .entry-title-->

							<div class="entry-body">
								<p>
									  <?php 
    if ($row['description'] != '') {
        echo ReStrLen($row['description'], 65);
    } else {
        echo '網站資料更新中...';
    }
    ?>
   
								</p>
							</div><!--/ .entry-body-->

							<div class="entry-meta">
								<span class="date"><?php 
    echo GetDateTime($row['posttime']);
    ?>
</span>
								<span class="date"><a href="<?php 
    echo $gourl;
開發者ID:jsycwangwei,項目名稱:NJIT,代碼行數:31,代碼來源:news.php


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