Php accesses network shared resources and local files. [Php] metahttp-equivContent-Typecontenttexthtml; charsetGBK? Php $ filenameD: pic_gatherfigure1.png; $ sizefilesize ($ filename); echo $ size ;? My company has no access to the Internet, but my job [php]
$ Filename = "D:/pic_gather/figure/1.png ";
$ Size = filesize ($ filename );
Echo $ size;
?>
The company has no access to the Internet, but my work needs to be on the Internet, so I can only use the company's public computer. Use your computer to remotely operate on him (in fact, you can get proxy, but this method is not used ). So some files are on the public machine, but I am too lazy to take the test, so I use the folder to be accessed, set it to share, and then access it using php.
The simple test code is as follows:
The above code reads the size of the 1.png file shared by pic_gather/figure.pdf on the public computer.
Note that only the slash "/" can be used here, otherwise the access will fail. This is also the best way to make your code compatible with linux.
The code for accessing local resources is as follows:
[Php]
$ Filename = "D:/pic_gather/figure/1.png ";
$ Size = filesize ($ filename );
Echo $ size;
?>
Author: wolinxuebin
Required meta http-equiv = Content-Typecontent = text/html; charset = GBK? Php $ filename = D:/pic_gather/figure/1.png; $ size = filesize ($ filename); echo $ size ;? The company has no access to the Internet, but my work...