'PHP Desktop - Access to local resources
can you help me with access to local reseources?
For example I want glob my images outside of www folder. PHP has access but chrome not show this images.
Thanks for your answer. Martin
Solution 1:[1]
Browser cannot access anything outside of the www/ directory, but PHP scripts can access the whole file system. You can output images through a PHP script, see for an example:
Solution 2:[2]
What you're trying to achieve is possible with PHP Desktop and it is quite easy. In PHP Desktop you have full access to the filesystem in PHP scripts and you can replace the native "Choose file" dialog with your own custom implementation using PHP and js/jquery scripting. You could reuse or base your code on some existing PHP library that allows you to browse files,
see https://tinyfilemanager.github.io/demo/.
Or just do something simple, I think implementing a custom "Choose file" dialog with jquery and PHP is a matter of a few hours.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Czarek Tomczak |
Solution 2 | Tarek Adra |