View previous topic :: View next topic |
Author |
Message |
draw -
Joined: 18 Apr 2006 Posts: 4
|
Posted: Tue Apr 18, 2006 3:51 pm Post subject: Accessing files on the webserver |
|
|
Hi,
I try to run on my local server an exe file from a php script like this
......
print "<td align=center width=25>
<a TARGET=\"_blank\" href="file:///c:/Program%20Files/myfile.exe"</a></td>";
......
Clicking the link will not work !!!!
What's wrong ? |
|
Back to top |
|
 |
olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Tue Apr 18, 2006 4:05 pm Post subject: |
|
|
What is the actual error message you're getting? And what language is the code written in, in your post?
Also are you expecting the exe to output HTML code to the browser, or something else? _________________ Olly |
|
Back to top |
|
 |
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Tue Apr 18, 2006 4:33 pm Post subject: |
|
|
Well for a start, "file:///c:/Program%20Files/myfile.exe" is trying to access your machine not the web server so its never going to work.
If you want it to access your local machine the remove "file:///" then it should work.
(correct me if im wrong.) _________________ Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk |
|
Back to top |
|
 |
draw -
Joined: 18 Apr 2006 Posts: 4
|
Posted: Wed Apr 19, 2006 6:17 am Post subject: Accessing files on the webserver |
|
|
Yes, Yes, thanks to "The Inquisitor", removing "file:///" was the solution.
If I put the link in a simple html page (reading the page only by the browser) it works with "file:///" included.
Putting the link in a php script (in this case the script will run over the server) I have to remove "file:///".
Can anyone explain this ????? |
|
Back to top |
|
 |
draw -
Joined: 18 Apr 2006 Posts: 4
|
Posted: Wed Apr 19, 2006 7:21 am Post subject: |
|
|
Not the end of the story !!!!!!
Amazing,amazing .......
Running my php script via the server (localhost) and removing "file///" from the link, I see in the browser (status bar) that "file///" is added again by php or the browser (iexplorer)! Then it will not work
php script:
........
print "<td align=center width=25><a TARGET=\"_blank\" href=\"c:/Program Files/myfile.exe\" > myfile</a></td>";
........
the browser "iexplorer" returns in the status bar
http://localhost/file///c:/Program%20Files/myfile.exe
clicking the link returns nothing, no error message and no action
FireFox returns in the status bar:
c:/Program Files/myfile.exe
clicking the link will open a new window (caused bij TARGET=_blank) and returns an error message: " no association with protocol (c) "
What's going on ???????? |
|
Back to top |
|
 |
olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Wed Apr 19, 2006 1:17 pm Post subject: |
|
|
What are you expecting the "myfile.exe" to do? If you need it to output the results to the web browser I think that you need to declare it in Abyss's interpreters, as you would for PHP, etc...
If you just want it to run like a normal application, I don't think you need to include the target attribute. _________________ Olly |
|
Back to top |
|
 |
|