问个问题 关于截取字段的
thinkphp吧
全部回复
仅看楼主
level 1
w421511854 楼主
public function bspxinx(){
$Data=M('commodity');
$list=$Data->where('id='.$_GET[id])->select();
$this->assign('list',$list);  
$this->display();
}
这是我写的后台 输出代码
2011年06月16日 03点06分 1
level 1
w421511854 楼主
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>产品发布</title>
<style type="text/css">
<!--
.wal {
     float: right;
     height: 200px;
     width: 200px;
     border: 1px solid #CCCCCC;
}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action=" ">
<foreach name='list' item='list'>
<div class="wal"><img src="__PUBLIC__/{$list.tupian}" width="200" height="200" /></div>
   <p>商品名称:{$list.username}   </p>
   <p>商品编号:{$list.number}</p>
   <p>在库数量 :{$list.limit}
     <label></label>
</p>
   <p>商品价格:{$list.price}</p>
   <p>入库时间:{$list.data}</p>
   <p>状 态 :{$list.leibie}
     <label></label>
   </p>
   <p>商品简介:</p>
   <p>
     <label>
     <textarea name="textfield" cols="80" rows="10">{$list.modity}</textarea>
     </label>
   </p>
</foreach>
</form>
</body>
</html>
这是页面代码
2011年06月16日 03点06分 2
level 1
w421511854 楼主
这是截图 怎么让箭头指的那段文字 输出做个限制
2011年06月16日 03点06分 3
level 1
{$list.modity|mb_substr=0,10}
2011年07月26日 10点07分 4
level 5
正解
2011年09月24日 01点09分 5
1