如何将php代码更改为asp.net代码

问题描述:



下面写的代码用于根据特定的当地时间计算特定活动的剩余天数,即纽约的时间或伦敦的时间。

Hi
the code written below is for calculating the number of days remain for a particular event based on the specific local time i.e. time in new york or time in london.

展开 | 选择 | Wrap | 行号

我看到的只是javascript代码
All I saw was javascript code there


在javascript代码中一些PHP代码也写在第9行,当我在.net中运行此代码时,它给出了错误,这是php所以我想更改/修改以便我可以运行/使用此没有错误
in that javascript code some php code is also written at line 9 and when I run this code in .net it gives error and that is of php so i wanted to change/modify so that i can run/use this without error


好吧这就是这一行:

var servertimestring =(servermode ==" server-php")? &LT ;?打印日期(F d,Y H:i:s,time())?>'':( servermode ==" server-ssi")? ''<! - #config timefmt ="%B%d,%Y%H:%M:%S"><! - #echo var =" DATE_LOCAL" - >'':''<%=现在()%>''


我不确定那条线是做什么的,只需打印时间具体格式?
Ok so it''s just this line:
var servertimestring=(servermode=="server-php")? ''<? print date("F d, Y H:i:s", time())?>'' : (servermode=="server-ssi")? ''<!--#config timefmt="%B %d, %Y %H:%M:%S"--><!--#echo var="DATE_LOCAL" -->'' : ''<%= Now() %>''

I''m not sure what that line does, just print the time in a specific format?