Finding the name of a server so that it can be accessed via PHP
-
27-06-2021 - |
Domanda
What I am trying to do is read and write from a shared folder on a network. The .php is something like fopen(\\\\server\\share\\file.txt, "r")
, but my problem is I dont know what name to supply for the server name.
Can I use the IP address as the server name?
Or is the server name what I have circled in red?
Soluzione
You can use the ip. Whatever format works with windows explorer (given that you add any needed extra backslashes that are used for escaping) should work with php, too.
Altri suggerimenti
On windows that would be:
fopen("\\\\server\\share\\file.txt", "r");
(you must use quotes)
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow