本文介绍了我可以在SHTML文件中包含一个PHP文件并将结果存储在SHTML变量中吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我想在SHTML文件中包含一个PHP文件,并将结果存储在SHTML变量中,并根据结果包含不同的内容.

I want to include a PHP file in an SHTML file and store the result in a SHTML variable and include different things depending on the result.

示例:
假设PHP脚本将以纯文本形式回显0/1(取决于诸如时间之类的东西).然后在SHTML中,我想将该PHP文件的输出存储在SHTML变量中.然后,如果存储在该变量中的值为1,则包含fileA.html,否则包含fileB.html.

Example:
Assume the PHP script would echo 0/1 in plain text (depending on something like time or something). And then in the SHTML, I'd like to store the output of that PHP file in a SHTML variable. Then if the value stored in that variable is 1, include fileA.html, else include fileB.html.

推荐答案

答案似乎是.

注意:可能应该仅使用PHP和服务器指令将.shtml文件视为PHP来实现.

NOTE:It should probably be implemented solely using PHP and a server directive to treat .shtml files as PHP.

这篇关于我可以在SHTML文件中包含一个PHP文件并将结果存储在SHTML变量中吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-09 03:09