How do I run a PHP script on localhost rather than putting a URL into a Web block ?
localhost/procedure.php not www.site/procedure.php
How do I run a PHP script on localhost rather than putting a URL into a Web block ?
localhost/procedure.php not www.site/procedure.php
You will need the IP address of your localhost machine, some thing like:
192.168.0.5
and use this in the url with your web component:
192.168.0.5/path/to/procedure.php
If you want to run the http server on your device, then use termux
You need Xampp to run php locally.
192.168.1.5/htdocs/molloy/molloyph.php
Invalid path error message
Is 192.168.1.5
the IP of your machine running the http server?
Do you need to provide that path, or would just calling the php file be enough?
Have you tested on the same machine as the server in a browser (Ip address or localhost should work) ?
You may need to put http://
in front of the Ip address (webviewer expects this...)
http://192.168.0.5/molloy/molloyph.php
should also work (if that ip address is correct for the local machine)
Yes but now it's showing another error saying unable to complete request with given data. It works fine sending it to the URL
Do not know how you are getting any response with that url. http://localhost...
in your app looks to html files in your assets (where you cannot have sub-folders)
Did you run the tests I suggested above ?
I'm using Abyss web server not XAMP
This is the path. ??
Simplify
Try calling http://localhost/index.html
in your app webviewer. What happens?
Then try calling http://192.168.0.5/index.html
in your app webviewer. What happens ?
(Again I assume, given that you have not confirmed, that 192.168.0.5
is the ip address of the machine with the server)
http://localhost/index.html
returns unable to complete request with given data (blob data)
http://192.168.0.5/index.html returns 'Please wait' and noting
192.168.0.5 is the ip
http://localhost/index.html
in the webviewer gives '404 not found'
so does it work in your app's webviewer ?