mtichy
mtichy

Reputation: 29

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

Upvotes: 0

Views: 587

Answers (2)

Tarek Adra
Tarek Adra

Reputation: 510

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.

Upvotes: 0

Czarek Tomczak
Czarek Tomczak

Reputation: 20645

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:

Output an Image in PHP

Upvotes: 0

Related Questions