开发者

How to insert filename php value into javascript?

Hello i got code where i put my images in array

<?php

foreach (array_merge(glob("NU/*.[jJ][pP][gG]"),glob("NU/*.[pP][nN][gG]"),glob("NU/*.[jJ][pP][eE][gG]"),glob("NU/开发者_运维知识库*.[gG][iI][fF]")) as $filename) {
}

?> 

and i got javascript where i must use this $filename! how can i put this value in javascript operations? some example would be welcome and appreciated ;)


<?php
print "<script type=text/javascript>var foo=$foo</script>";
?>

All the usual caveats about the safety of code injection and string escaping apply.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜