Re: PHP generated JavaScript

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






On Mon, February 20, 2006 1:59 am, Tim Burgan wrote:
> Is is possible to make an external Javascript with PHP.
>
> Am I doing this correcT?
>
> <?php
>
> header("Content-Type: text/javascript");
>
> $text = "Hello World";
>
> echo "alert('".$text."');";

You may need to include the trailing newline on this line...

I certainly would, needed or not.



> ?>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux