search

Home  >  Q&A  >  body text

PHP variable scope problem

In the course chapter "File Uploading and List Paging Display",

  1. queries the article list. $artList is defined in the if judgment to determine whether cate_id exists. Then give The code for template assignment should be displayed as undefined.

  2. When judging whether cate_id exists, if it exists, the condition will include cata_id = the incoming cate_id, but the query for querying all files is directly added outside the judgment. I feel it should be After including the cate_id query, you should also query all articles.

手机用户695453102手机用户6954531022174 days ago1162

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2019-01-24 11:29:53

    It is recommended that you post the code together. It is difficult to answer just by describing it. I have many courses and it is impossible to remember all the details of each course

    reply
    0
  • Cancelreply