* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: php error  (Read 1675 times)

0 Members and 1 Guest are viewing this topic.

Offline Jokeriske

  • Safe-haven access
  • Full User
  • Join Date: Jan 2016
  • Location:
  • Posts: 184
  • Post Rating Ratio: +2/-0
  • Im jokeriske from VelocityGames
    • VelocityGames
    • @velocitygamesbe
    • jokeriske
    • Velocitygames
  • Gender: Male
php error
« on: March 27, 2016, 07:07:10 pm »
hey, im getting this error when i try to list all files in a dir and make them clickable and redirect it to the file wich is clicked.

this is the error : Parse error: syntax error, unexpected ''>'' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ';' in /var/www/html/admin/uploads/index.php on line 17

this is the code im using :



Code: [Select]
$files=glob("*.{png,jpg,gif,mp3,mp4}",GLOB_BRACE);
$fileCount = count($files);

for ($i = ($fileCount-1); $i >= 0; $i--) { 
    echo '<center><a href='.$files'>'.$files'<img src='.$files[$i].' id="rcorners2" alt="" width="200px"></center></a>';
echo '</br>';
echo '</br>';
echo '</br>';
}


page_end();
?>

im noob in php i know, ive tried to google and understand the basics for php but this is a little bit above my level :/



Offline Jokeriske

  • Safe-haven access
  • Full User
  • Join Date: Jan 2016
  • Location:
  • Posts: 184
  • Post Rating Ratio: +2/-0
  • Im jokeriske from VelocityGames
    • VelocityGames
    • @velocitygamesbe
    • jokeriske
    • Velocitygames
  • Gender: Male
Re: php error
« Reply #1 on: March 27, 2016, 07:48:33 pm »
Problem solved, please lock this :)

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18727
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: php error
« Reply #2 on: March 27, 2016, 08:44:09 pm »
What was the issue, by the way? Also @Juju once made an image gallery for img.codewalr.us but he lost the code. He could probably have helped you as well. Or are you trying to make an avatar that changes every page load? I'm not familiar with PHP so I can't really understand most of the code.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Online Juju

  • aka Yuki Kagayaki aka J̵̭͕͇ù̞̭̝̯̦j̴̭̙̗͖͡ù͏͓̲̕
  • CodeWalrus Staff
  • Super User
  • Server Maintenance
  • Moderator
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Inside a walrus
  • Posts: 3074
  • Post Rating Ratio: +30/-2
  • Couch potato
    • jul.savard
    • juju2143
    • @juju2143
    • juju2143
    • @julosoft
    • juju-kun
    • /u/juju2143
    • juju2143
    • @juju2143
    • Juju's shed
  • Gender: Female
  • WalriiPoints: 99999
Re: php error
« Reply #3 on: March 27, 2016, 08:58:49 pm »
Please tell how you solved it, so others can see what was wrong.
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
  • Consoles, mobile devices and vintage computers owned: A lot
On hiatus until when the sun goes dark in plain day. on Aug 22-23 until around this weekend tuesday, so try to not kill each other during that time. SO POST LIKE CRAZY WHILE I'M NOT HERE THANKS
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

if you wanna throw money at me and/or CodeWalrus monthly it's here

Offline Jokeriske

  • Safe-haven access
  • Full User
  • Join Date: Jan 2016
  • Location:
  • Posts: 184
  • Post Rating Ratio: +2/-0
  • Im jokeriske from VelocityGames
    • VelocityGames
    • @velocitygamesbe
    • jokeriske
    • Velocitygames
  • Gender: Male
Re: php error
« Reply #4 on: March 28, 2016, 03:35:49 pm »
i used
Code: [Select]
echo '<center><a href='.$files'>'.$files'<img src='.$files[$i].' id="rcorners2" alt="" width="200px"></center></a>';
instead of
Code: [Select]
echo '<center><a href='.$files[$i].'><img src='.$files[$i].' id="rcorners2" alt="" width="200px"></center></a>';

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18727
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: php error
« Reply #5 on: March 28, 2016, 08:02:16 pm »
I see. I noticed that PHP can be picky when I did some SMF theme editing. X.x
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline Jokeriske

  • Safe-haven access
  • Full User
  • Join Date: Jan 2016
  • Location:
  • Posts: 184
  • Post Rating Ratio: +2/-0
  • Im jokeriske from VelocityGames
    • VelocityGames
    • @velocitygamesbe
    • jokeriske
    • Velocitygames
  • Gender: Male
Re: php error
« Reply #6 on: March 29, 2016, 11:01:57 am »
Yeah but php is fun to code with

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18727
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: php error
« Reply #7 on: March 29, 2016, 03:15:57 pm »
I don't like it much, but it still does the job very well so I cope with it when I need to do minor changes to something. I really need to learn it thoroughly at some point, though, so I can do more theme editing or even custom pages.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline Jokeriske

  • Safe-haven access
  • Full User
  • Join Date: Jan 2016
  • Location:
  • Posts: 184
  • Post Rating Ratio: +2/-0
  • Im jokeriske from VelocityGames
    • VelocityGames
    • @velocitygamesbe
    • jokeriske
    • Velocitygames
  • Gender: Male
Re: php error
« Reply #8 on: March 29, 2016, 06:58:38 pm »
I don't like it much, but it still does the job very well so I cope with it when I need to do minor changes to something. I really need to learn it thoroughly at some point, though, so I can do more theme editing or even custom pages.


are you going to change the theme? the way it is now is awesome

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18727
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: php error
« Reply #9 on: March 29, 2016, 07:01:48 pm »
Nah, I don't want to change it now, especially considering when we upgrade to SMF 2.1 (when it comes out, that is) we will have to redo the entire theme from scratch and lose every feature provided by SMF plugins that only runs on SMF 1.1 and 2.0. The potential loss of features could be another reason for learning PHP, by the way. :P
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline Jokeriske

  • Safe-haven access
  • Full User
  • Join Date: Jan 2016
  • Location:
  • Posts: 184
  • Post Rating Ratio: +2/-0
  • Im jokeriske from VelocityGames
    • VelocityGames
    • @velocitygamesbe
    • jokeriske
    • Velocitygames
  • Gender: Male
Re: php error
« Reply #10 on: March 30, 2016, 07:13:02 pm »
Nah, I don't want to change it now, especially considering when we upgrade to SMF 2.1 (when it comes out, that is) we will have to redo the entire theme from scratch and lose every feature provided by SMF plugins that only runs on SMF 1.1 and 2.0. The potential loss of features could be another reason for learning PHP, by the way. :P

yeah :P , are there alot of new features?

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18727
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: php error
« Reply #11 on: March 30, 2016, 07:24:35 pm »
I don't remember the highlights. The main change is that the theme is purposely made to be mobile-friendly and I often heard that the code is optimized much better. It's also open-source and on Github now, unlike previous versions of SMF which were coded by a specific team. But I hope that's not all there is in SMF 2.1 (although it would definitively make porting mods much easier).
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games