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

openElement

> Error Reports
  New Posts New Posts RSS Feed - PHP code doesn't work
  FAQ FAQ  Forum Search   Register Register  Login Login

PHP code doesn't work

 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: PHP code doesn't work
    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?

Back to Top
Hobby001 View Drop Down
Admin Group
Admin Group
Avatar

Joined: Jun 05 2018
Location: Canada, Québec
Status: Offline
Points: 6194
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hobby001 Quote  Post ReplyReply Direct Link To This Post 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");
}
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: 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!
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: 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 :)
Back to Top
Hobby001 View Drop Down
Admin Group
Admin Group
Avatar

Joined: Jun 05 2018
Location: Canada, Québec
Status: Offline
Points: 6194
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hobby001 Quote  Post ReplyReply Direct Link To This Post Posted: Feb 12 2020 at 10:11pm
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.070 seconds.