Print Page | Close Window

PHP code doesn't work

Printed From: openElement Website
Category:

openElement


Forum Name: Error Reports
Forum Description: Submit an error report for our technical support.
URL: https://forums.openelement.uk/en/forum_posts.asp?TID=1625
Printed Date: Apr 19 2024 at 3:48am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: PHP code doesn't work
Posted By: YayJoh
Subject: PHP code doesn't work
Date Posted: Feb 12 2020 at 3:24pm
When I add a block of PHP code, like this:

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

I get this:

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

Can you help me solve this?

By the way: when I publish the site on my domain, I get this:

Forbidden

You don't have permission to access this resource.

Which obviously seems to have to do with the FTP function. Maybe you can help me get over this too?




Replies:
Posted By: Hobby001
Date Posted: Feb 12 2020 at 4:25pm
php variable names must start with a $

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


-------------
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: Feb 12 2020 at 5:16pm
Haha, thank you! I should have knon Tongue Well, and the FTP issue.. I think I'll fix that on my own. Thanks!


Posted By: YayJoh
Date Posted: Feb 12 2020 at 8:56pm
So problem 1 is solved. Problem 2 is that I can't upload the page to a webserver.

Come in please :)


Posted By: Hobby001
Date Posted: Feb 12 2020 at 10:11pm
https://wiki.openelement.com/en/index.php?title=Publishing_Settings" rel="nofollow - https://wiki.openelement.com/en/index.php?title=Publishing_Settings



-------------
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