BullGuard Antivirus Sale - 60% Off with openElement !
openElement Website Homepage
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: 12 Feb 2020
Status: Offline
Points: 4
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: 12 Feb 2020 at 16:24
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: 05 Juin 2018
Location: Canada, Québec
Status: Offline
Points: 4589
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hobby001 Quote  Post ReplyReply Direct Link To This Post Posted: 12 Feb 2020 at 17:25
php variable names must start with a $

echo( "Hello universe" );
for( $n = 0; $n < 5; $n++ ) {
echo("A");
}
Anyone who wants to put something on line gets hooked by something big
Back to Top
YayJoh View Drop Down
Newbie
Newbie


Joined: 12 Feb 2020
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote YayJoh Quote  Post ReplyReply Direct Link To This Post Posted: 12 Feb 2020 at 18:16
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: 12 Feb 2020
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote YayJoh Quote  Post ReplyReply Direct Link To This Post Posted: 12 Feb 2020 at 21:56
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: 05 Juin 2018
Location: Canada, Québec
Status: Offline
Points: 4589
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hobby001 Quote  Post ReplyReply Direct Link To This Post Posted: 12 Feb 2020 at 23:11
Anyone who wants to put something on line gets hooked by something big
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 10.11
Copyright ©2001-2012 Web Wiz Ltd.

This page was generated in 0,015 seconds.