Print Page | Close Window

Running a PHP script

Printed From: openElement Website
Category:

openElement


Forum Name: openElement General Discussion
Forum Description: A place for general discussion and questions about the software.
URL: https://forums.openelement.uk/en/forum_posts.asp?TID=1733
Printed Date: Apr 19 2024 at 11:30am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Running a PHP script
Posted By: YayJoh
Subject: Running a PHP script
Date 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.



Replies:
Posted By: Hobby001
Date Posted: Aug 24 2020 at 3:46pm
Page tab
Server Scripts
PHP


-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: YayJoh
Date Posted: Aug 24 2020 at 6:51pm
As far as I can see, you can't use PHP with OpenElement. 


Posted By: Hobby001
Date 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


-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: YayJoh
Date 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. 


Posted By: Hobby001
Date 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.




-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net