shtml

PHP or htaccess make dynamic url page to go 404 when item is missing in DB

余生颓废 提交于 2019-12-06 07:25:35
Typical scenario: DB items are displaied in page http://...?item_id=467 User one day deletes the item Google or a user attempts to access http://...?item_id=467 PHP diggs into DB and sees items does not exist anymore, so now PHP must tell Google/user that item is not existing via a 404 header and page. According to this answer I undertstood there is no way to redirect to 404 Apache page via PHP unless sending in code the 404 header + reading and sending down to client all the contents of your default 404 page. The probelm: I already have an Apache parsed custom 404. shtml page, so obvioulsy I

Mouse Genome Informatics(MGI)数据库介绍

雨燕双飞 提交于 2019-12-05 17:48:30
欢迎来到"bio生物信息"的世界 有些人研究了很久的基因,都不一定知道他们研究的基因在小鼠模型上发挥什么作用——陈文燕 今天想介绍一个数据库MGI,全称 Mouse Genome Informatics 。 网站地址: http://www.informatics.jax.org/ 下面仔细讲一下MGI可以获得什么信息 1 基因在ENSEMBL, Havana/Vega, MGI,NCBI的可视化比较 下图是某个基因区域在几大数据库的可视化结果。可以很直接的比较小鼠和人类基因组的区别。 感兴趣的直达链接: http://www.informatics.jax.org/genes.shtml 2 某个基因或者突变在小鼠身上发生的变异 这个数据库很全,几乎所有的基因都能搜到。 动手搜一搜就能找到你研究的基因在小鼠敲除模型中会发生什么变化。 以Sox2为例,在小鼠突变模型中与“行为,听力/前庭/耳朵,皮肤,死亡率/衰老,神经系统,色素沉着”有关。 感兴趣的直达: http://www.informatics.jax.org/phenotypes.shtml 3 人类-小鼠相关的疾病 这个是结合了人类和小鼠疾病的信息,作为一个识别人类疾病候选基因,并以此作为小鼠模型的有力工具。 网站直达: http://www.informatics.jax.org/humanDisease.shtml

Can I include a PHP file in an SHTML file and store the result in a SHTML variable?

人盡茶涼 提交于 2019-12-04 06:12:33
问题 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. 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. 回答1: Doesn't sound possible. SHTML uses different methods of

SSI协议

时光总嘲笑我的痴心妄想 提交于 2019-12-03 14:09:11
SSI(Server Side Include)使用于HTML中,用于在请求内容返回到客户端前执行页面中的SSI命令,生成动态内容。通常用于多个页面引用公共的内容模块,将此模块分离出来,使用SSI引入即可。 <!--#include virtual="/inc/header.html"--> 以上代码便能在服务端完成header.html的动态引入,非常简单。 服务端配置 使用SSI之前需要服务端进行简单的配置,开启SSI功能。SSI是针对HTML增加动态内容的技术,所以只对HTML类型文件(.html,.shtml),使用SSI功能的文件建议使用.shtml后缀,便于维护。如果使用.shtml后缀需在服务端作一些配置: AddType text/html .shtml AddOutputFilter INCLUDES .shtml 第一行命名配置将.shtml作为html文件返回 第二行命令用于在返回请求内容前执行页面中的SSI命令,如果你在.html文件中使用SSI,那么将.shtml改为.html即可。 SSI命令 SSI的语法有点像HTML注释,所以如果SSI不能识别,那么将被视作HTML注释处理。SSI的语法功能主要包括:变量的设置/获取,文件的引用,可执行命令,条件表达式等。 ———————————————— 版权声明:本文为CSDN博主「zhuofai_」的原创文章

What is SHTML

隐身守侯 提交于 2019-12-03 00:57:09
问题 Recently I came to know about SHTML. And also I have look at site having extensions as .shtml. What is the purpose of SHTML in what ways it differ from HTML and DHTML 回答1: SHTML is a file extension that lets the web server know the file should be processed as using Server Side Includes (SSI). (HTML is...you know what it is, and DHTML is Microsoft's name for Javascript+HTML+CSS or something). You can use SSI to (for example) include a common header and footer in your pages, so you don't have

php正则表达式问题

匿名 (未验证) 提交于 2019-12-02 22:11:45
问题: Warning : preg_match(): Unknown modifier ‘/‘ in D:\wwwroot\www.xb.com\t.php on line 6 bool(false) NULL 我的代码: <?php $str = ‘‘; $isMatched = preg_match("/http://www.chinanews.com/gn/2018/07-04/8555660.shtml/", $str, $matches); var_dump($isMatched, $matches); 问题原因: 上述正则的定界符是斜杠’/’, 所以以此往后找,再找一个斜杠’/’,就结束了,得到的是: /http:/ 所以,后面跟着的内容: /www.chinanews.com/gn/2018/07-04/8555660.shtml/ 就没法识别了。 解决办法是: 1. 把定界符,改为别的,和当前正则表达式中的字符,不会冲突的,比如: "#/http://www.chinanews.com/gn/2018/07-04/8555660.shtml#"; 就可以了。 2. 在定界符内的‘/‘前面加上转义字符‘\‘, 如下 "/http:\/\/www.chinanews.com\/gn\/2018\/07-04\/8555660.shtml/" <?php $str =

What is SHTML

半城伤御伤魂 提交于 2019-12-02 14:24:49
Recently I came to know about SHTML. And also I have look at site having extensions as .shtml. What is the purpose of SHTML in what ways it differ from HTML and DHTML Robert Grant SHTML is a file extension that lets the web server know the file should be processed as using Server Side Includes (SSI). (HTML is...you know what it is, and DHTML is Microsoft's name for Javascript+HTML+CSS or something). You can use SSI to (for example) include a common header and footer in your pages, so you don't have to repeat code as much, and changing one included file updates all of your pages at once. You

Can I include a PHP file in an SHTML file and store the result in a SHTML variable?

时光怂恿深爱的人放手 提交于 2019-12-02 10:06:10
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. 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. Doesn't sound possible. SHTML uses different methods of parsing the code so I don't think the PHP will run on the page to return a value to the SHTML. Why are you

How to include PHP file in SHTML pages?

旧街凉风 提交于 2019-12-01 21:42:16
I have a shtml file index.shtml in which I want to include a PHP file which performs some programing and returns HTML data. I am trying to include my PHP file but I don't know how to do that, I tried following but nothing is working, Following line is just printing an error, " [an error occurred while processing this directive] ": <!--#include file="/SSI/test.php"--> This line is displaying some junk characters: <!--#include virtual="/SSI/test.php"--> This line is doing nothing and displaying the command as is in the .shtml page <?PHP include("/SSI/test.php"); ?> Thanks If there is no

PHPCMS shtml设置

天大地大妈咪最大 提交于 2019-12-01 07:56:00
什么是SSI? SSI是英文Server Side Includes的缩写,翻译成中文就是服务器端包含的意思。从技术角度上说,SSI就是在HTML文件中,可以通过注释行调用的命令或指针。SSI具有强大的功能,只要使用一条简单的SSI命令就可以实现整个网站的内容更新,时间和日期的动态显示,以及执行shell和CGI脚本程序等复杂的功能。 如何使你的Apache服务器支持SSI? Apache默认是不支持SSI的,需要我们更改httpd.conf来进行配置。我这里以windows平台的Apache 2.0.x为例:打开conf目录下的httpd.conf文件,搜索“AddType text/html .shtml”,搜索结果: # AddType text/html .shtml # AddOutputFilter INCLUDES .shtml 把这两行前面的#去掉。 然后搜索“Options Indexes FollowSymLinks” 在搜索到的那一行后面添加“ Includes” 即将该行改变为: Options Indexes FollowSymLinks Includes 保存httpd.conf,重起apache即可。 开启shtml 打开文件 ./include/config.inc.php <?php //数据库配置信息 define('DB_HOST',