当前位置: 首页>>代码示例>>PHP>>正文


PHP _strcut函数代码示例

本文整理汇总了PHP中_strcut函数的典型用法代码示例。如果您正苦于以下问题:PHP _strcut函数的具体用法?PHP _strcut怎么用?PHP _strcut使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了_strcut函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: huodemem

function huodemem($shopuserid)
{
    $mysql_model = System::load_sys_class('model');
    $userid = $mysql_model->GetOne("select * from `@#_member` where `uid`='{$shopuserid}'");
    if ($userid['username']) {
        return $userid['username'];
    } else {
        if ($userid['mobile']) {
            return _strcut($userid['mobile'], 7);
        } else {
            return _strcut($userid['email'], 7);
        }
    }
}
开发者ID:think-css,项目名称:yungou,代码行数:14,代码来源:my.fun.php

示例2: create

 public function create()
 {
     /*新建*/
     if (isset($_POST['submit'])) {
         $tag_name = $_POST['tag_name'];
         $tag_val = $this->TagParse(stripslashes($_POST['tag_val']));
         $tag_des = _strcut(htmlentities($_POST['tag_des'], ENT_NOQUOTES, "utf-8"), 30);
         if (empty($tag_name)) {
             _note("标签名不能为空");
         }
         $this->AddNewFile();
         include YYS_CACHES . 'caches_codes/tag.sys.package.php';
         $header = '<?php defined(\'IN_YYS\') or exit(\'Access Denied.\'); $TAG = Array(); ?><?php ' . PHP_EOL;
         $TAG[$tag_name] = $tag_des;
         $con = '$TAG = ' . var_export($TAG, true);
         $end = ";" . PHP_EOL;
         $val1 = file_put_contents(YYS_CACHES . 'caches_codes/tag.sys.package.php', $header . $con . $end);
         $str = "QWERTYUIOPLKJHGFDSAZXCVBNM";
         $qz = $str[rand(0, 25)] . $str[rand(0, 25)] . $str[rand(0, 25)] . $str[rand(0, 25)];
         $qz .= $str[rand(0, 25)] . $str[rand(0, 25)] . $str[rand(0, 25)] . $str[rand(0, 25)];
         $header = '<?php defined(\'IN_YYS\') or exit(\'Access Denied.\'); ?>' . PHP_EOL;
         $header .= '<?php ' . "return <<<" . $qz . PHP_EOL;
         $con = $tag_val;
         $end = PHP_EOL . $qz . ";" . PHP_EOL;
         $val2 = file_put_contents(YYS_CACHES . 'caches_codes/tag.' . $tag_name . '.php', $header . $con . $end);
         if (gettype($val1) != 'integer' || gettype($val2) != 'integer') {
             _note("失败");
         } else {
             _note("完成", G_ADMIN_PATH . "/htmlcustom/lists");
         }
     }
     $this->checkchmod();
     if (empty($_POST)) {
         include $this->dwt(DOWN_M, 'htmlcustom.create');
     }
 }
开发者ID:haidao17,项目名称:backend,代码行数:36,代码来源:htmlcustom.action.php

示例3: _strcut

    } else {
        ?>
					<img src="<?php 
        echo G_TEMPLATES_STYLE;
        ?>
/images/prmimg.jpg" width="30" height="30"/>
					<?php 
    }
    ?>
					<?php 
    if (uidcookie('username') != null) {
        echo _strcut(uidcookie('username'), 7);
    } elseif (uidcookie('mobile') != null) {
        echo _strcut(uidcookie('mobile'), 7);
    } else {
        echo _strcut(uidcookie('email'), 7);
    }
    ?>
				</a>&nbsp;&nbsp;
				<a href="<?php 
    echo WEB_PATH;
    ?>
/member/user/cook_end" class="gray01">[退出]</a>
			</li>
			<?php 
} else {
    ?>
			<li id="logininfo" class="h_login">
				<i>您好,欢迎光临!</i>				
				<a class="gray01" href="<?php 
    echo WEB_PATH;
开发者ID:king3388,项目名称:king,代码行数:31,代码来源:egglotter.header.php

示例4: foreach

    <tbody>
    	<?php 
    foreach ($record as $v) {
        ?>
        	<tr>
                <td align="center"><?php 
        echo $v['code'];
        ?>
 <?php 
        if ($v['code_tmp']) {
            echo " <font color='#ff0000'>[多]</font>";
        }
        ?>
</td>
                <td align="center"><?php 
        echo _strcut($v['shopname'], 0, 25);
        ?>
</td>              
                <td align="center"><?php 
        echo $v['gonumber'];
        ?>
人次</td>
                <td align="center">¥<?php 
        echo $v['moneycount'];
        ?>
元</td>
                <td align="center"><?php 
        echo date("Y-m-d H:i:s", $v['time']);
        ?>
</td>
                <td align="center"><?php 
开发者ID:ping199143,项目名称:1ydb,代码行数:31,代码来源:dingdan.jf_soso.tpl.php

示例5: nei

 public function nei()
 {
     $id = abs(intval($this->segment(4)));
     if (!$id) {
         _message("页面错误");
     }
     $tiezi = $this->db->GetOne("select * from `@#_quanzi_tiezi` where `id`='{$id}'");
     if (!$tiezi) {
         _message("页面错误");
     }
     $dianji = $tiezi['dianji'] + 1;
     $this->db->Query("UPDATE `@#_quanzi_tiezi` SET `dianji`='{$dianji}' where `id`='{$id}'");
     $title = $tiezi['title'] . "_" . _cfg("web_name");
     $keywords = $tiezi['title'];
     $description = _strcut($tiezi['neirong'], 0, 250);
     $member = $this->db->GetOne("select * from `@#_member` where `uid`='{$tiezi['hueiyuan']}'");
     $quanzi = $this->db->GetOne("select * from `@#_quanzi` where `id` = '{$tiezi['qzid']}'");
     $num = 10;
     $total = $this->db->GetCount("select * from `@#_quanzi_hueifu` where `tzid` = '{$tiezi['id']}'");
     $page = System::load_sys_class('page');
     if (isset($_GET['p'])) {
         $pagenum = $_GET['p'];
     } else {
         $pagenum = 1;
     }
     $page->config($total, $num, $pagenum, "0");
     if ($pagenum > $page->page) {
         $pagenum = $page->page;
     }
     $hueifu = $this->db->GetPage("select * from `@#_quanzi_hueifu` WHERE tzid='{$tiezi['id']}' order by id DESC", array("num" => $num, "page" => $pagenum, "type" => 1, "cache" => 0));
     foreach ($hueifu as $key => $val) {
         $hueifu[$key]['hueifu'] = _htmtocode($hueifu[$key]['hueifu']);
     }
     include templates("group", "nei");
 }
开发者ID:king3388,项目名称:king,代码行数:35,代码来源:group.action.php

示例6: _strcut

    ?>
</td>
			<td align="center"><?php 
    echo _strcut($v['title'], 12);
    ?>
</td>
			<td align="center"><?php 
    echo $v['width'];
    ?>
</td>
			<td align="center"><?php 
    echo $v['height'];
    ?>
</td>
			<td align="center"><?php 
    echo _strcut($v['des'], 16);
    ?>
</td>
			<td align="center">
				<a href="<?php 
    echo WEB_PATH;
    ?>
/admanage/admanage_admin/update_area/<?php 
    echo $v['id'];
    ?>
">修改</a>
                <span class='span_fenge lr5'>|</span>
				<a href="<?php 
    echo WEB_PATH;
    ?>
/admanage/admanage_admin/del_area/<?php 
开发者ID:ping199143,项目名称:1ydb,代码行数:31,代码来源:adarea.tpl.php

示例7: foreach

    </thead>
    <tbody>
	<?php 
foreach ($vote as $v) {
    ?>
	<tr align="center" class="mgr_tr">
		<td ><?php 
    echo $v['vote_id'];
    ?>
</td>
		<td><?php 
    echo $v['vote_title'];
    ?>
</td>
		<td><?php 
    echo _strcut($v['vote_number'], 25);
    ?>
</td>
		<td class="number"><?php 
    echo date('Y-m-d', $v['vote_starttime']);
    ?>
</td>
		<td><?php 
    echo date('Y-m-d', $v['vote_endtime']);
    ?>
</td>
		<td><?php 
    echo date('Y-m-d', $v['vote_sendtime']);
    ?>
</td>
		 
开发者ID:think-css,项目名称:yungou,代码行数:30,代码来源:vote.list.tpl.php

示例8: _strcut

                <td><?php 
    echo $v['id'];
    ?>
</td>
				<td><a href="<?php 
    echo G_MODULE_PATH;
    ?>
/content/article_list/<?php 
    echo $v['cateid'];
    ?>
"><?php 
    echo $this->categorys[$v['cateid']]['name'];
    ?>
</a></td>
                <td><?php 
    echo _strcut($v['title'], 0, 25);
    ?>
</td>
                <td><?php 
    echo $v['author'];
    ?>
</td>
                <td><?php 
    echo $v['hit'];
    ?>
</td>
                <td><?php 
    echo date("Y-m-d H:i:s", $v['posttime']);
    ?>
</td>
                <td class="action">
开发者ID:haidao17,项目名称:backend,代码行数:31,代码来源:article.lists.tpl.php

示例9: _strcut

</td>
                <td>第(<?php 
    echo $v['qishu'];
    ?>
)期 <span style="<?php 
    echo $v['title_style'];
    ?>
">
                <a target="_blank" href="<?php 
    echo WEB_PATH;
    ?>
/goods/<?php 
    echo $v['id'];
    ?>
"><?php 
    echo _strcut($v['title'], 30);
    ?>
</a></span></td>
                <td><a href="<?php 
    echo G_ADMIN_PATH;
    ?>
/content/goods_list/<?php 
    echo $v['cateid'];
    ?>
"><?php 
    echo $cate_name;
    ?>
</a></td>
                <td><font color="#ff0000"><?php 
    echo $v['canyurenshu'];
    ?>
开发者ID:ping199143,项目名称:1ydb,代码行数:31,代码来源:qishu.list.tpl.php

示例10: date

                ?>
"><?php 
                echo $tiezi['title'];
                ?>
</a> 
				   <!--  <i class="jing"></i>&nbsp; -->
				   <?php 
            }
            ?>
					<span class="time"><?php 
            echo date("Y年m月d日 H:i", $tiezi['time']);
            ?>
</span>
				</div>
				<div class="gray02"><?php 
            echo _strcut($tiezi['neirong'], 160);
            ?>
</div>
				<div class="topic-reply">
					<div>
						<a href="<?php 
            echo WEB_PATH;
            ?>
/group/nei/<?php 
            echo $tiezi['id'];
            ?>
" class="gray02">回复<span class="gray03">(<?php 
            echo $tiezi['hueifu'];
            ?>
)</span></a>&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="<?php 
开发者ID:shuay,项目名称:projectYG,代码行数:31,代码来源:e5562c8103cf4ce7e1028608e0959918.tpl.php

示例11: foreach

    ?>
</td>
		<td><?php 
    foreach ($quanzi as $qz) {
        if ($v['qzid'] == $qz['id']) {
            echo $qz['title'];
        }
    }
    ?>
</td>
		<td><?php 
    echo _strcut($v['title'], 25);
    ?>
</td>
		<td class="number"><?php 
    echo _strcut($v['neirong'], 25);
    ?>
</td>
		<td><?php 
    echo $v['hueifu'];
    ?>
</td>
		<td><?php 
    echo $v['dianji'];
    ?>
</td>		
		<td><?php 
    if ($v['zhiding'] == 'N') {
        echo "未置顶";
    } else {
        echo "置顶";
开发者ID:king3388,项目名称:king,代码行数:31,代码来源:quanzi.tiezi.tpl.php

示例12: _strcut

        ?>
" target="_blank"><?php 
        echo $Record['username'];
        ?>
</a></li>
			<li class="name"><a href="<?php 
        echo WEB_PATH;
        ?>
/goods/<?php 
        echo $Record['shopid'];
        ?>
">(第<?php 
        echo $Record['shopqishu'];
        ?>
雨)<?php 
        echo _strcut($Record['shopname'], 60, null);
        ?>
</a></li>
			<li class="much"><?php 
        echo $Record['gonumber'];
        ?>
人次</li>
		</ul>
        <?php 
    }
}
$ln++;
unset($ln);
?>
   
        
开发者ID:shuay,项目名称:projectYG,代码行数:29,代码来源:135824fd73a73cfe45d3c50cd41f0b72.tpl.php

示例13: _strcut

			<div class="groups-Rinfo"><!-- <?php 
        echo _strcut($tz['title'], 24, "");
        ?>
 -->
				<p class="groups-ht"><a href="<?php 
        echo WEB_PATH;
        ?>
/group/nei/<?php 
        echo $tz['id'];
        ?>
" class="gray"> <?php 
        echo $tz['title'];
        ?>
</a></p>
				<p class="groups-c gray02"><?php 
        echo _strcut(quanzid($tz['qzid']), 10);
        ?>
<span class="gray03"> | </span><?php 
        echo huifu($tz['id']);
        ?>
条回复</p>
			</div>
		</div>
		<?php 
    }
}
$ln++;
unset($ln);
?>
		<?php 
if (defined('G_IN_ADMIN')) {
开发者ID:shuay,项目名称:projectYG,代码行数:31,代码来源:f7bbfe30e578e967d49c7714ddcd6401.tpl.php

示例14: idjia

        ?>
" target="_blank"><img src="<?php 
        echo G_UPLOAD_PATH;
        ?>
/<?php 
        echo $user['uphoto'];
        ?>
" border="0" width="20" height="20"></a>
				<a href="<?php 
        echo WEB_PATH;
        ?>
uname/<?php 
        echo idjia($user['uid']);
        ?>
" target="_blank" class="blue"><?php 
        echo _strcut($user['username'], 6);
        ?>
</a>
				<?php 
        if ($user['ip']) {
            ?>
				(<?php 
            echo get_ip($user['id'], 'ipcity');
            ?>
 IP:<?php 
            echo get_ip($user['id'], 'ipmac');
            ?>
)
				<?php 
        }
        ?>
开发者ID:king3388,项目名称:king,代码行数:31,代码来源:d18ae30a33d261002a3a4f8253434cec.tpl.php

示例15: idjia

            echo idjia($hf_for['sdhf_userid']);
            ?>
" target="_blank" class="name-img">									
									<img id="imgUserPhoto" src="<?php 
            echo G_UPLOAD_PATH;
            ?>
/<?php 
            echo $hf_for['sdhf_img'];
            ?>
" width="50" height="50" border="0"/>								
								</a>
								<p><a href="#" class="blue"><?php 
            echo $hf_for['sdhf_username'];
            ?>
</a>:&nbsp;<span><?php 
            echo _strcut($hf_for['sdhf_content'], 50);
            ?>
</span></p>
								</dd>
							<?php 
        }
        ?>
						</dl>
						<p class="text-h10"></p>
					</div>	
					<?php 
    }
}
$ln++;
unset($ln);
?>
开发者ID:ping199143,项目名称:1ydb,代码行数:31,代码来源:67b4e5e5fc2dc8f665482a2340c0af8b.tpl.php


注:本文中的_strcut函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。