bash in html
Dear all,
I have a bash script which looks like that: Code:
#!/bin/sh A link like this works: Code:
<A HREF="http://localhost/cgi-bin/html2.sh">sh</A> Code:
<script src="http://localhost/cgi-bin/html2.sh" type="text/javascript"> </script> Any idea? By the way is it possible to get the file name of an html page in an html script? Thanks, Eric. |
In the first (working) example, the script is called and executed on the server. It produces output which is sent to your browser.
The second example specifies a script which is to be executed on the client, that is inside you web browser. Web browsers do not understand Bash, just Javascript (and I think Visual Basic, maybe some more). A line like this could never work. jlinkels |
That for your answer I'll try an other way.
Eric. |
You could make your script into a cgi script -it will still be executed on the server machine though.
|
This works:
Code:
<object type="text/html" data="http://localhost/cgi-bin/date.py"></object> Code:
<object type="text/html" data="http://localhost/cgi-bin/html2.sh"></object> Eric. |
All times are GMT -5. The time now is 12:41 AM. |