I am working on a invoice report with my companies intranet. I would like to be able to link the invoice number to the actual invoice. My problem is that the file resides on a different server and not the web server.
When I'm on the computer I have to use the remote desktop connection to access the server to get to the files.
I've tried \SERVER\file_path.pdf and file:\\SERVER\file_path.pdf and neither works.
What you are doing is disabled by design. This sort of link to a local file will work in some browsers as long as the HTML is also called from a local file (ie file:///pageContainingLink). If not, it's a security vulnerability. It won't work at all in webkit based browsers.
See <A>nchor Link to Local File? (<a href='file:///{path}'>DEAD LINK</a> not working in FireFox but in IE)
And Cross-browser link to file on local system
If you want to get this to work, you'll need the other server to be a web-server too so that you can link to http://intranet2/fileYouWant.pdf
Try creating a symbolic link from the network share \SERVER\ to your machine --> X:\pathtoyourapacheroot\distantdocuments on your server machine
Then you should be able to use it just has if your file was on your machine x:\pathtoyourapacheroot\distantdocuments\file_path.pdf.
Related
I'm trying to download a file on a remote machine on button click in html. Like I have link of a file which is " File link: - https://perso.telecom-paristech.fr/eagan/class/igr204/data/Camera.csv ". I want to download this file to
a remote machine on a button click in html. I don't know how to connect to remote machine for downloading that file.
So it will be like, when I'm clicking on download button in html file on my machine / local machine, this file should get downloaded to the remote machine or some other machine instead of my local machine. Will "ip address" will be sufficient to connect to remote machine and store the file in that machine?
Can someone please help to do that or tell me other way to get it done?
Web browsers provide no mechanism for a website to determine where a file will be saved, so even if they had access to the target machine, you couldn't do this with client-side code.
You need to write a web service (you can use whatever programming language you like, my preference these days would be to use JavaScript with the Express module (to provide the web service) and Axios (to do the download) for Node.js).
You need to make an HTTP request to the web service when the button is clicked (this can be as simple as using a <form> with the action URL pointing to the web service so a request is made to it when the submit button is clicked.
Then the web server needs to perform the download.
I am running WAMP on my personal computer for a webapp I developed that I use. I wanted to know if it is possible to load a local piece of software from a hyperlink. The webapp will generate certain parameters and this is passed on to the software, which has a command line interface. I am aware that browsers generally do not have access to files located outside of their designated folder that serves webpages, but in this case, I would be generating parameters that are passed to a software. Thanks.
Try using file:/// protocol if you want to link to local files.
Sample link:
Open Local Video file
I’m trying to make access to my MAMP localhost from my mobile phone and other Windows PC. I’m currently using a Mac.
While I can see the database content but the website doesn’t render as usual (no images, stylesheet, etc…).
Therefore I assume the other PC can access the database but can’t use the files. Maybe the PHP files are not processed?
Does anyone have a suggestion on what could be the cause and how to fix it?
However I can see the database content but the website doesn't render
as usual (no images, stylesheet, etc)
Does your site on the MAMP install use hardcoded URLs for CSS, images & JavaScript? Something like this:
http://localhost/images/a_great_image.png
If so, when a remote host accesses your site, they will not be able to see the content on URLs like that since they will be pointing to localhost and localhost is an address directly connected to the local machine. Meaning that any machine will only see localhost as their actual machine; never a remote machine. It’s a loopback hostname for testing & restricted local access.
The two solutions you have is to do the following:
Change the localhost address to be the IP address of your computer on the network. So if your computer is reached via the IP 10.0.1.3, then the URL would be: http://10.0.1.3/images/a_great_image.png.
Change the URLs to be relative URLs such as /images/a_great_image.png and maybe use base tag like this <base href="http://10.0.1.3/" target="_blank"> on each page. That way all your links in URLs are relative, but the base is set once & is always http://10.0.1.3/.
I have installed wordpress on my IIS server using web plaform intaller, everything is working fine when i am working on localhost.
when when i am trying to browse from external or another pc, the links are stayed http://localhost/page.php, which should be http://myserver/page.php
even the styling is not applied because of that.
how do I change the Path and make it work??
Thanks
You will have saved in the database that your site url was http://localhost. To access it from everywhere, I'd use your IP address instead, that way you should be able to see it on your local and external machines.
Do a quick export of your db, open in a text editor.
Find/ replace 'localhost' and change it to whatever your computer's IP is.
Import your changed sql file. Should be all good :)
Actually, i have opened a site in a free web hosting company which is not offering file sharing facility (i.e. to store files in different formats) so online chat community of d same site advised me to store the files in a remote server of sites such as rapidshare.com, mediafire.com. But i need downloading and uploading facilities in my website. So i have decided to run uploading and downloading php scripts frm my website which will be connected to the remote server, but i'm afraid scripts are not working. As my user name in mediafire is "karthik_raju1#yahoo.com" when executing the code with this user name i have got an "Error:username must not contain '#' symbol". Can u please suggest me d code to upload files to remote server and kindly suggest me some important tips ,if any...
If you are wanting to store other files, a simple solution would be to consider a better free host such as 000webhost.com or byethost.com or awardspace (This is not an advertisement).