Accessing files on the webserver

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
draw
-


Joined: 18 Apr 2006
Posts: 4

PostPosted: Tue Apr 18, 2006 3:51 pm    Post subject: Accessing files on the webserver Reply with quote

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 View user's profile Send private message
olly86
-


Joined: 25 Apr 2003
Posts: 993
Location: Wiltshire, UK

PostPosted: Tue Apr 18, 2006 4:05 pm    Post subject: Reply with quote

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 View user's profile Send private message
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Tue Apr 18, 2006 4:33 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
draw
-


Joined: 18 Apr 2006
Posts: 4

PostPosted: Wed Apr 19, 2006 6:17 am    Post subject: Accessing files on the webserver Reply with quote

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 View user's profile Send private message
draw
-


Joined: 18 Apr 2006
Posts: 4

PostPosted: Wed Apr 19, 2006 7:21 am    Post subject: Reply with quote

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 View user's profile Send private message
olly86
-


Joined: 25 Apr 2003
Posts: 993
Location: Wiltshire, UK

PostPosted: Wed Apr 19, 2006 1:17 pm    Post subject: Reply with quote

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 View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group