Posted by Anonymous on 09/15/06 19:51
hoozdiss wrote:
>
> i installed apache 2.2 on winxp with php5. when i write a piece of
> html and include a php or java script in the html i have no problem.
> when i file the script and use something like
> <script src="script.php"></script>
> i get nothing. he finds the file - if i rename it - he complains.
> i'm guessing a config param. please help.
You made two substantial mistakes.
1) If you use the HTML <script> tag you must tell the user agent which
language it is written in.
e.g. <SCRIPT type="text/vbscript"
src="http://someplace.com/progs/vbcalc">
2) The <script> tag is for client side scripting only! The server should
just pass the script to the user agent which should execute it.
If you want to include PHP scripts from a file use
<?php
include("/path/script.php");
?>
Bye!
[Back to original message]
|