本文整理汇总了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;
}
示例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>';
}
示例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&MySQL版本: <?php
echo PHP_VERSION;
?>
&<?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') . '秒';
示例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'];
示例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'));
?>
示例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
示例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'];
?>
示例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 != '') {
示例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
示例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;