Find a php code that calls the txt file data and assigns a value to reference the txt if... else judgment statement.
Homepage file index.html
Reference File: The third line in./txt/pan.txt: false or yes
Make an if.elsesentence in index.html. the variable dovalue is the value in the third row of pan.txt;
How should I write this php?
Reply to discussion (solution)
Wrong. line 4.
Thank you! But what if I want to output a p layer instead of a single sentence? What should we do?
Wrong. line 4.
In fact, the output is
If the do value is yes, it will be output. if it is false, it will not be output. how can this problem be achieved?
{query:name=commend_goods as co join=left join goods as go on co.goods_id eq go.id where=co.commend_id eq 1 and go.is_del eq 0 AND go.id is not null fields=go.list_img,go.sell_price,go.name,go.market_price,go.id limit=7 order=id desc group = id}{set:$tmpId=$item['id'];}
- {$item['name']}
RMB{$item['sell_price']}
{/query}
Wrong. line 4.
What is your template language?
If the knowledge output is correct, you can modify it and directly echo"
"Okay. if it is false, no processing is performed. if it is false, no judgment is required to determine whether it is yes.
In fact, the output is
If the do value is yes, it will be output. if it is false, it will not be output. how can this problem be achieved?
{query:name=commend_goods as co join=left join goods as go on co.goods_id eq go.id where=co.commend_id eq 1 and go.is_del eq 0 AND go.id is not null fields=go.list_img,go.sell_price,go.name,go.market_price,go.id limit=7 order=id desc group = id}{set:$tmpId=$item['id'];}
- {$item['name']}
RMB{$item['sell_price']}
{/query}
Wrong. line 4.
OK thank you!
What is your template language?
If the knowledge output is correct, you can modify it and directly echo"
"Okay. if it is false, no processing is performed. if it is false, no judgment is required to determine whether it is yes.