Company A news management system, the release of news after the opening of each page displayed is a site name. Want to change the news after the show as the title of the article. This is also suitable for such tools to propagate.
Thanks for it.
This is the address when the connection is opened http://192.168.0.253:8088/business/index.php?m=index&a=actionClass&actype=content&fid=2 &cid=2 It is by cid=x this to judge is to open an article.
This is the template source code showing the article
<?php echo $SITETITLE;? > It's here. Modify to display the displayed article title
Company Article Management System
{$rs. Title}
Edit {$rs. Aut}/{$rs. time|date= "y-m-d", # # #}
{$rs. Content}
This is the effect when I open an article
Reply to discussion (solution)
In the PHP background through the cid=2 to the database query the title of the article to assign value to $sitetitle to the page on the line
{$rs. title} put this in the place
{$rs. title} put this in the wrong place. I've tried it already.
In the PHP background through the cid=2 to the database query the title of the article to assign value to $sitetitle to the page on the line
How do I find the CID number that is open on the current page?
In the PHP background through the cid=2 to the database query the title of the article to assign value to $sitetitle to the page on the line
How do I find the CID number that is open on the current page?
Didn't you open it through the link? Http://192.168.0.253:8088/business/index.php?m=index&a=actionClass&actype=content&fid=2&cid=2?
$cid = $_get[' cid '];
You're talking about a method of getting a CID, and a way to use substr
$Model =new Model ();
$Model->query ("Select Nr_name from ai_content where id=$_get[' CID ']");
Unable to bring up the corresponding title.
also want to guide. Data ai_centent ID corresponds to CID to display the caption corresponding to Rn_name
This was developed through the thinkphp. also want to guide. Thank you.
In the PHP background through the cid=2 to the database query the title of the article to assign value to $sitetitle to the page on the line
How do I find the CID number that is open on the current page?
Didn't you open it through the link? Http://192.168.0.253:8088/business/index.php?m=index&a=actionClass&actype=content&fid=2&cid=2?
$cid = $_get[' cid '];
thinkphp I didn't use you to look at your other calls. How do you call a database? It's all the same.
$rs. Title is actually $rs[' title '
So<?php echo $rs [' title '];? >
No, it's definitely you. The code does not follow the normal TP framework process.
In fact, there is a stupid method of emergency.
is to use jquery to take the title instead of the content in title.
$ (function () {
$ (' title '). Text ($ (' H3 '). Text ());
})
$rs. Title is actually $rs[' title '
So<?php echo $rs [' title '];? >
No, it's definitely you. The code does not follow the normal TP framework process.
In fact, there is a stupid method of emergency.
is to use jquery to take the title instead of the content in title.
$ (function () {
$ (' title '). Text ($ (' H3 '). Text ());
})
Last night and this morning the development document of its thinkphp was read. studied a bit. Indeed this does not follow the normal frame too much to walk. See the source code has not been found to continue.
Your second method of testing is feasible. Thank you!!
Today the feeling of desperation with a most stupid method, but also the simplest way to solve, that is, this code can get the title of the article, content, publisher and release time, then why I do not use this code to take the title?!!
{$rs. Title}
Edit {$rs. Aut}/{$rs. time|date= "y-m-d", # # #}
{$rs. Content}
Try this piece of code altogether get the title of the article. However, it is not known whether the subsequent impact on other production functions or performance needs to be tested.
<view id= "rs" cid= ' $cid ' > {$rs .title}</view>
No matter what, thank you for your help.