开发者

php code not embedded properly

I am using CodeIgniter for PHP. Can anybody tell me why is this code not working properly?

  <form action="/TestCodeIgniter/index.php/blog/comment_insert/<?php $this->uri->segment(3);?>" method="post">

However, this code works fine :-

<?php echo form_open('blog/comment_insert/' . $this->uri->segment(3) ); ?>

I am very much sure that segment(3) exists in my pretty url. Then how come if i use plain HTMl my php code doesn't get embedded?

Thanks in a开发者_如何转开发dvance :)


<?php $this->uri->segment(3);?>

Unless the segment method has the side effect of echoing something, this won't generate any output. It probably returns a string instead, which you should ouput with echo:

<?php echo $this->uri->segment(3);?>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜