Forums

Server directory selection

Lesanjo 02 Mar, 2013
Greetings,

Today's question is how I can select a file that is in the server with the aim of getting both web path and absolute path.

The application of this process would be to dynamically create image tiles for my homepage.

I like the Upload element and action, they get me access to file paths but its one way.

Is it possible to get a 'Select File' element that can give me the desired paths?
GreyHead 02 Mar, 2013
Hi Lesanjo,

You want both the folder path and the URL? I'm not clear. You can convert a path to a URL by using str_replace something like this:
<?php
$url = str_replace(JPATH_SITE, JURI::root(), $path);
?>
You may need to replace a // with a single / afterwards to clean it up.

Bob
Lesanjo 02 Mar, 2013
The path issue is settled:-)

Now, how can I explore the server directory from within chronoform? (Like the explorer that is inbuilt in most text editors)
GreyHead 02 Mar, 2013
Hi Lesanjo,

There's no file manager/folder explorer in ChronoForms, I install the Joomla! exTplorer extension to do this.

Bob
This topic is locked and no more replies can be posted.