开发者

Generating a random number in an SHTML page

开发者 https://www.devze.com 2023-02-26 06:16 出处:网络
I need to attach a random number to a query string in an SHTML page. It\'s straightforward to generate the value in PHP:

I need to attach a random number to a query string in an SHTML page. It's straightforward to generate the value in PHP:

function get_random_id(){
  srand ((double) microtime( )*1000000);
  return rand(0,1844);
}

But how do you use this when the SHTML page uses syntax like this?

<img src="<!--#echo var="imagemapgif" -->" name="Image1" width="169" height="41" usemap="#Map" id="Image1">

Anyone kn开发者_Go百科ow of a syntax manual for SHTML pages? Thanks.


You need to run an external program to get a random number using a server side include.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号