My question is this:

I'm trying to practice PHP. I use OpenElement as my editor. You can get to know this program through this website: https://www.openelement.com/ Problem is: when I preview the page (with PHP in it) it doesn't display text produced by PHP, but instead it produces the PHP code itself. Do you know OpenElement, and if you know it, do you know how to make it run PHP the way PHP should ben run?

Thanks,

Leon (joh)

Recommended Answers

All 4 Replies

Additionally:

OpenElement allows you to preview pages with a webserver function. This way it works a little bit, not completely. By publishing the pages on a domain it doesn't work at all. I suspect that this has to do with the FTP function.

Help

With this code:

echo( "Hello universe" );
for( n = 0; n < 5; n++ ) {
    echo("A");
}

With 'preview' I get this:

Parse error: syntax error, unexpected '=', expecting ';' in E:\Web\OpenElement PHP\index.php on line 22

And when I upload the code, I get this:

Forbidden
You don't have permission to access this resource.

Which has to get to do with uploading through FTP. I think I'lll solve that one myself.

The cause of the problem was: no prefix. n should be $n. So that's that with the code.

Problem 2 is: I can't upload the files to an FTP server.

Help

I haven't used this program myself, I would go through this guide on the Openelement Wiki:

Wiki Openelement Publishing Settings

PHP code is a scripting language ran on the webserver(Pre-Hypertext Processing, IE it processes Hypertext(HTML) before it is sent to the browser), so you will have to upload it to the webserver to run the PHP script. Open Element probably is just missing the FTP settings so it can connect and upload the files to the right folder on the server and then it will also need to know what the actual web address is to view the processed file after it is uploaded.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.