Posted by Pablito on 10/17/84 11:38
"jamen" <jamen@invalid> ha scritto nel messaggio
news:43dcc9ca$0$2086$edfadb0f@dtext02.news.tele.dk...
> Pablito wrote:
> > can I pass a $var maked with PHP to javascript
>
> of course..
>
> <script type="text/javascript">
>
> var jsvar = <?php echo $phpvar ?>;
>
> </script>
I thank you very much but my script is this and it is like your but do not
work
Why?
<?php
$cont=fopen('cont.txt','r');
$incr=fgets($cont);
//echo $incr;
$incr++;
fclose($cont);
$cont=fopen('cont.txt','w');
fwrite($cont,$incr);
fclose($cont);
echo "<script type="text/javascript">
var incr=$incr
</script>";
?>
Pablito
[Back to original message]
|