This topic has been archived. It cannot be replied.
-
枫下家园 / 电脑用户 / 网站要经常更新,需要写些只给自己看的注释(不能让访问者看到,即不能发布出去,但又要和网页内容相结合),请问有什么好的办法。MS FrontPage的注释是可以被访问者看到的,如果看网页源代码的话
-agincourt(百灵鸟);
2003-12-4
(#1497945@0)
-
帮你顶一下。。。好久没有紧跟新技术了。不知道有没有什么东东解决你在静态html中注释的问题。。。如果能换成server端的script,就简单了。
-expertune(伪劣);
2003-12-4
(#1498123@0)
-
详细注释写在SCRIPT文件里. 静态html注释中写SCRIPT文件名
-schen(欲语还休);
2003-12-4
(#1498216@0)
-
自己搞个小程序好了。写代码的时候该怎么写就怎么写,该注释救注释,不过是用一些特殊的记号,比如:“<!--myNotes”、“--myNotes-->”。然后用自己写的小程序去掉这些注释,作为发布的页面放到网站上,有注释的作为开发的页面自己留着。
-guestagain(guest again);
2003-12-4
(#1498744@0)
-
如果你企图能从网页上看到,那么别人也能看到。所以,一定要用服务器端的脚本/程序做。比如在调用网页的时候加一个口令,没有口令的不给注释,有口令的才显示在JSP里面可以这样写:
<%if(request.getParameter("Password")!=null&&request.getParameter("Password").equals("口令")){%>
注释
<%}%>
在调用的时候: http://url/update.jsp?Password=口令
而别人调用的时候没有问号跟后面的东西,注释就看不见了
-tztz(三天打鱼两天晒网);
2003-12-4
{246}
(#1498760@0)
-
嗯,嗯,有道理……多谢以上各位!
-agincourt(百灵鸟);
2003-12-4
(#1498770@0)
-
简单,在进含有注释的页面之前先访问另外一个页面,那个能生成一个cookie,然后含有注释的页面检查有cookie的就显示注释。很简单的php脚本。
-heian(黑暗㊣效果不好,走!);
2003-12-4
(#1498776@0)
-
down一个windows下的grep命令,发布之前用grep把开发版里的所有注释去掉生成一个发布版,搞定。反正你那个站规模又不大,不值得又是cockie又是php啥的。贪玩另说。
-pasu(InTheSky);
2003-12-4
(#1498856@0)
-
建议PHP用SESSION,方便,想写*%(^$#^*^就写.
-suantou(多雨的冬天);
2003-12-4
(#1498895@0)
-
问一下:我在自己机子上配session,不起作用,IIS和apache都不行,同样代码在别的机器上可以,大概是什么问题?
-helloyou(你好!-------------);
2003-12-4
(#1498913@0)