Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Building Websites with PHP Contact Form & Sending Email Next Steps & Challenge

Michal Broniewicz
Michal Broniewicz
6,681 Points

Exporting website from workspace to the web

I finished Building Websites with php course creating my own site and now i would like to put it online. After I removed files from my previous site on this domain and uploaded all files needed it is not working. What shows up is:

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /index.php on line 8

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /index.php on line 8

Parse error: syntax error, unexpected T_STRING in /index.php on line 8

line 8 and few following are:

$app = new \Slim\Slim(array(
  'view' => new \Slim\Views\Twig()
));

Guess its because composer was installed on workspace and i used it to install everything then I tried to export just files. What can i do to fix it?

1 Answer

I guess it's because of Composer since it's a dependency manager. So try to re-install(or install) it in you new project and then install of stuffs like slim,twig etc.

Michal Broniewicz
Michal Broniewicz
6,681 Points

How do I install it on a server where i upload all files via FTP? How to access console to install and then run it?