在codeigniter

时间:2017-04-21 06:11:41

标签: codeigniter

先谢谢。

在我的新项目中,我必须显示用户发布...假设用户提供了多个中断,必须在前端删除..

这是代码

<p class="font-20"><?php echo substr(strip_tags($row->post), 0).'....';?><p>

但是这里所有的帖子和图片都被删除了..我的输出是

Sachin Tendulkar: The god of small things   If you’ve spent your life in the middle, with every move scanned by the peering eyes of a billion people, you are bound to be judged. But Tendulkar endured all censure without resentment. © Getty Images   I was only 12 when Sachin Tendulkar first represented India and left a nation instantly mesmerised. I remember watching him dance down the track to hit Abdul Qadir for three towering sixes, and must have tried to do the same innumerable times, if only in my imagination. While I was still learning how to stand properly at the crease, Tendulkar was earning standing ovations around the globe; while I was still learning how to use my feet to get to the pitch of the ball, Tendulkar was taking giant strides. The more I played the game, the more I admired him, for it was only through playing that one truly understood the scale of what he was doing.       I was only 12 when Sachin Tendulkar first represented India and left a nation instantly mesmerised. I remember watching him dance down the track to hit Abdul Qadir for three towering sixes, and must have tried to do the same innumerable times, if only in my imagination. While I was still learning how to stand properly at the crease, Tendulkar was earning standing ovations around the globe; while I was still learning how to use my feet to get to the pitch of the ball, Tendulkar was taking giant strides. The more I played the game, the more I admired him, for it was only through playing that one truly understood the scale of what he was doing. By the end of the 1990s, it was as if he had ceased to be just a player, and now symbolised excellence. It was around this time that I started nurturing the dream of playing for India myself. And yet playing for India and playing alongside Tendulkar seemed two separate things. Playing for India would mean countless hours of toil, something I was prepared for. But nothing had prepared me for sitting in the dressing-room next to my idol. I was a bundle of nerves when I walked into the conference hall of Ahmedabad’s plush Taj hotel for my first India team meeting in October 2003. I had attended many team meetings before, but had little idea of how this one would unfold – and even less idea of how I would react to my first encounter with Tendulkar. Fifteen minutes in, I worried our chat wouldn’t go beyond the customary exchange of greetings: words were failing me already. Our coach, John Wright, divided the team into batsmen and bowlers to discuss the forthcoming Test against New Zealand. I’m glad he did, for that’s when Tendulkar and I were introduced properly. I had played a couple of warm-up games against the tourists, so questions were thrown in my direction about how their bowlers were shaping up. To my utter surprise and pleasure, Tendulkar was the most inquisitive. How was Daryl Tuffey bowling? Had Daniel Vettori bowled his arm-ball? He wanted to know everything. He had played these bowlers many times – and successfully. What need was there for a batsman of his capability to ask such questions of a rookie like me? But he did. And the reason became clear. He wanted to allow me to break the ice, to interact with him, to know him better. I suspect he realised that, as with most Indian debutants, I was overawed, and that this wasn’t likely to change unless he made a special effort. I can’t thank him enough for the gesture. A couple of days later, confident from our last interaction, I called his room seeking an audience. Once again, he was happy to oblige. Until then, I’d been to the hotel rooms of many senior and junior cricketers, and had found most of them like any boy’s room, strewn with dirty laundry, shoes, cricket gear, laptop and iPod. Tendulkar’s was different: meticulous and organised, like his batting. Gods’ idols were on the bedside table, bats neatly arranged in one corner, bed linen without any creases, dirty linen nowhere. He ordered a cup of coffee for us both, and chatted freely, as if we’d known each other for years. I asked him about his preparation and game plans, and he began to share details. What I saw of Tendulkar in the days that followed left an indelible mark. He was always first to the team bus, because he didn’t like rushing. He would plan most of his innings by making mental notes for the bowlers he was likely to face – a habit that meant he wouldn’t sleep properly for a fortnight before India’s game against Pakistan in the 2003 World Cup. It was during our chat that I realised preparation for every battle was as crucial to success at the top as natural ability. Knowing the opposition is important, but so is knowing your own game. Those 40 minutes I spent with him changed the way I looked at Tendulkar – the player and the man – for ever. We batted first in the Test, and I made 42. As I walked back to the pavilion, the stadium erupted. Almost everyone in the stands was on their feet. So this was what it was like to play for your country! I was disappointed to have missed a fifty, but that feeling evaporated as I soaked up the ovation. The noise continued even after I was seated in the dressing-room – which was when I realised, to my embarrassment, that the applause might not have been for me. Needless to say, it had been for the man walking out to bat, not the man walking into the pavilion. Only then did I begin to wonder what it must be like to be Sachin Tendulkar, carrying the burden of so many hopes. And yet he behaved with the utmost humility. In that moment, my respect for him rose several notches. The real measure of the man lay in the fact that even the most senior members of the team showered him with respect. “I want to protect him. Tendulkar must not come out to bat to play a few balls in the fading light against the raging Aussies – he is our best hope to win the game.” Those words, spoken by another great man, Rahul Dravid, to Nayan Mongia during the First Test at Mumbai during the famous 2000-01 series, still ring in my ears. The beauty of the relationship between Tendulkar and the other senior players was their mutual respect; no one behaved like a superstar. All of them encouraged an atmosphere of comfort, in which even a junior could happily pull a prank. As I spent more time in the dressing-room, I gained a closer look at Tendulkar’s quest for excellence. Every net session had a purpose, leading to a discussion about what he was doing right or wrong. And he was quite happy getting feedback from the newcomers, including me. Each time he asked me something, I would remind him that it should be the other way around. But he would have none of it, constantly prodding me for my view. Sachin would ask me about his stance, head position, backlift and downswing. And it wasn’t just me: he would ask the net bowlers whether they could see him stepping out, or premeditating his strokes. Greatness isn’t just what you know, but what you don’t – and the effort you make to bridge that gap. Tendulkar mastered that art. His gift was to appear in control. And that was so different from how I, or my colleagues, functioned. He didn’t always need to score a truckload of runs to spread calm. Sometimes, he just needed to do what felt beyond the rest of us, and put bat to ball. Here was a man who not only timed his moves so well that he looked programmed by computer but, with a twirl of the bat, made the ball kiss the sweet spot. Criticism is inevitable, and so it was for him. If you’ve spent your life in the middle, with every move scanned by the peering eyes of a billion people, you are bound to be judged. But he endured all censure without resentment. It was as if greatness went hand in hand with humility. That may have been the greatest lesson of all. "/\r|\n/,

如何克服这个问题...

1 个答案:

答案 0 :(得分:0)

<p class="font-20"><?php echo substr(strip_tags($row->post,'<img>'), 0).'....';?><p>

使用strip_tags的第二个参数,它允许您不想删除的标记