开发者

Uploadify: sending data with scriptData

I want to send the session value with uploadify script. I'm tryin following in javascript:

 'scriptData': {'name':'<?php echo $_SESSION[name];?>'}

and in the php script im ge开发者_如何转开发tting the value like:

$name = $_GET['name'];

The script data returns the value <?php echo $_SESSION[name];?> instead of getting the value stored in session, for example Peter. Can someone please tell me how can i fix it? Thanks


I think this is what you're looking for.

'scriptData': {'name':<?php echo "'".$_SESSION[name]."'";?>}


I think your are modifying a .js file instead of a .php file. So, a .js file will never execute php code (between tags)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜