javascript捕获并显示php变量

javascript捕获并显示php变量

问题描述:

I have standard text links which all say "Full View". When clicked these links send out php in this form: http://mysite.com/fullview.php?myimage=30

Basically there's thumbnailed images and text links that say full view. I'd like for fullview.php to capture the myimage variable, and display it as a full sized image. Meaning, a blank page (fullview.php) displaying the image. Sounds likes javascript to me.

How do you put the javascript into fullview.php to capture the variable and display it as a full sized image?

Thanks for any help, Darrell

我有标准文本链接,都说“全视图”。 单击这些链接时,会以这种形式发送php: http://mysite.com/fullview.php? myimage = 30 p>

基本上有缩略图和文字链接,表示全景。 我想用fullview.php捕获myimage变量,并将其显示为全尺寸图像。 意思是显示图像的空白页面(fullview.php)。 听起来像javascript给我。 p>

如何将javascript放入fullview.php来捕获变量并将其显示为完整大小的图像? p>

感谢您的帮助, Darrell p> div>

php is server side script javascript is client side script

so displaying a web page to a user first is executed php and result is send to client. After he receive it then javascript is executed

HTH

Ivo Stoykov

You just need to read the query parameters. In fullview.php you can use

$myimage = $_GET['myimage']; to capture this variable. And then can use it accordingly.