BullGuard Antivirus Sale - 60% Off with openElement !
Forum Home Forum Home >

openElement

> openElement General Discussion
  New Posts New Posts RSS Feed - Running a PHP script
  FAQ FAQ  Forum Search   Register Register  Login Login

Running a PHP script

 Post Reply Post Reply
Author
Message
YayJoh View Drop Down
Newbie
Newbie


Joined: Feb 12 2020
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote YayJoh Quote  Post ReplyReply Direct Link To This Post Topic: Running a PHP script
    Posted: Aug 24 2020 at 12:04pm
This time I have a little more advanced topic. I'm trying to write a script, but when I add one it doesn't run on the server: it just shows the <?php ?> tags in the HTML. My experience is that a PHP-script must run in a PHP file. So.. how do I create a PHP file in OpenElement? Or is it possible to run a PHP-script from a HTML-file? Myself, I'm not sure. But it would be awesome, for I know quite something about PHP.
Back to Top
Hobby001 View Drop Down
Admin Group
Admin Group
Avatar

Joined: Jun 05 2018
Location: Canada, Québec
Status: Offline
Points: 6195
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hobby001 Quote  Post ReplyReply Direct Link To This Post Posted: Aug 24 2020 at 3:46pm
Page tab
Server Scripts
PHP
Back to Top
YayJoh View Drop Down
Newbie
Newbie


Joined: Feb 12 2020
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote YayJoh Quote  Post ReplyReply Direct Link To This Post Posted: Aug 24 2020 at 6:51pm
As far as I can see, you can't use PHP with OpenElement. 
Back to Top
Hobby001 View Drop Down
Admin Group
Admin Group
Avatar

Joined: Jun 05 2018
Location: Canada, Québec
Status: Offline
Points: 6195
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hobby001 Quote  Post ReplyReply Direct Link To This Post Posted: Aug 24 2020 at 7:20pm
I used php without issues, configure your page as mentioned earlier.

Originally posted by Hobby001 Hobby001 wrote:

Page tab
Server Scripts
PHP

And once done, explain your issue
Back to Top
YayJoh View Drop Down
Newbie
Newbie


Joined: Feb 12 2020
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote YayJoh Quote  Post ReplyReply Direct Link To This Post Posted: Aug 24 2020 at 7:40pm
Ok, I'm probably wrong here.. but I'm still having difficulties. When I include a piece of code and upload the file, the PHP-code is displayed in the HTML in stead of being run. 
Back to Top
Hobby001 View Drop Down
Admin Group
Admin Group
Avatar

Joined: Jun 05 2018
Location: Canada, Québec
Status: Offline
Points: 6195
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hobby001 Quote  Post ReplyReply Direct Link To This Post Posted: Aug 24 2020 at 10:16pm
once you have converted your page from htm to php using given instructions, add a php code block at the required position.

Add your code and skip the <?php and ?> tags

For something that execute without displaying a page, put the code at start document and put exit(); at the very last line.


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.