Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4059290
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:11:22+00:00 2026-05-20T15:11:22+00:00

in the index.php, i put this code in. $smarty->assign(‘goods_commnet’, get_comment_count()); function get_comment_count(){ return 2;

  • 0

in the index.php, i put this code in.

$smarty->assign('goods_commnet', get_comment_count());

function get_comment_count(){
    return 2;
}

then in the index.dwt. i put the output

{$goods_commnet}.

the smarty templae is ok.because when i instead the function to 2. the page can show 2.

the error tip is “can’t get the function get_comment_count() defined?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T15:11:22+00:00Added an answer on May 20, 2026 at 3:11 pm

    What will happen when You swich the order:

    function get_comment_count(){
        return 2;
    }
    
    $smarty->assign('goods_commnet', get_comment_count());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

index.php <?php require_once('fr.php'); header('Location:'.abspath().directory()); ?> fr.php <?php require_once('functions.php'); ?> functions.php function abspath() { return
index.php contains links in this style: <a href=index.php?id=1>1</a> <a href=index.php?id=2>2</a> and then a PHP
when I start my index.php it calls my javascript file that has this code
how can i redirect index.php?search= to the base url? I tried it with this
I got this navbar with a dropdown ul on it. <ul class=topbar-nav> <li><a href=index.php>Home</a></li>
I want to loop through this array: $securePages=array(admin.php,addslot.php,classpost.php); $pagename=admin.php Then if admin.php is found
I have this php code: <?php if(!file_exists('counter.txt')){ file_put_contents('counter.txt', '0'); } if($_GET['click'] == 'yes'){ file_put_contents('counter.txt',
I've written the following code to get JSON data with a POST request. $.post(http://example.com/songs/search_api/index.php,
In my index file where the form and function are located, named: index.php $(function()
I use .htaccess Mod Rewrite to send the URL to index.php, which then parses

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.