Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PHP download using $sc->download()

Featured Replies

The documentation for the SuperContainer PHP class says there is a method to download files:

$localPath = $sc->download('uploads/12345', '/tmp');

How does one use this? Is it the action of a form from a submit button? A link? Are there any code examples beyond that one line example in the documentation?

I'm building a full doc management solution in PHP using SC. People can click or right-click on the SC <iframe> or <img> to do the download, but a lot of people won't know that. A button to invoke the $sc->download() function would be better.

Also, how does one specify the desktop as destination in cross-platform manner? Use a block like if(Mac), ~/Desktop, else if(Windows)...?

Thanks.

Gary

  • 2 weeks later...

Gary,

Yes, using User Agents or some derivative of this is one way to handle cross-platform applications. There are some better answers and solutions online that could answer this much better than I can though.

Regards,

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.