could you help me modify my page title? i am working on my PHP file for several days but still can not work it out, have to return to your help. in my PHP files, software-description.php includes template.php, where i put my title, meta-keywords and meta-description. what I want is title, meta-keywords and meta-description change with the content of my page, for instance, let them equal to $rst["s_name"] at line 125 of software-description.php file, instead of being equal for all pages. i attach the two files, hoping you can help me modify them, or give me a hint how to change them? I am a newbie at this field, thanks a lot for your help in advance.
You need to load the title into a variable BEFORE the template is loaded. Usually a simple db query is suffice to get what you need.
Who did these coding? Looks real bad Here's what i think you can do - Do some modification to main() function in software-description.php 1. make $rst global variable - global $rst; In template.php (at the top) 1. start output buffer - ob_start() 2. call main() function in template.php 3. clear buffer - ob_end_clean(); 4. now all values you need are in $rst.