Re: Creating a home screen "web app" for smart phone
| From: | Nick Kelley | Date: | Fri, 24 Apr 2020 17:53:56 +0000 |
| Subject: | Re: Creating a home screen "web app" for smart phone | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-327106@lists.php.net to get a copy of this message | ||
On Fri, Apr 24, 2020 at 10:30 am, mbox@s22.us wrote:
Is there a way to do what I’m trying to do? Or am I going about it the wrong way? How can I make this script work as a web app on my phone?Keep in mind that your PHP script runs on each request. It's impossible to run the script multiple times without additional requests. Unless you're using Javascript/AJAX requests, that means navigating to a different page, which sounds like exactly what you're trying to avoid. To accomplish what you're trying to do, you may benefit from learning a single-page frontend framework, such as Ember [1]. This will let you navigate the web app without actually changing pages. The frontend then makes AJAX requests to your PHP (or whatever backend language you choose) scripts to get data from the server. [1] Ember: https://emberjs.com/