alnoda-workspaces/workspaces/php-workspace/removeme_docs/getting-started.md
2022-05-23 16:13:15 +00:00

1.9 KiB

Getting started

Intro

To start, open Quickstart page localhost:8020 for quick access to all the tools

From the quicklaunch page you can open workspace tools, such as code editor or terminal

Demo: Workspace UI

wid-ui.png

The main code editor of this workspace is Code-server

Demo: Code-server

Code-server demo

Workspace has full-size browser-base terminal

Base-Workspace terminal

Hello World

Check PHP version

php -v

Open IDE and create file hello.php with the following content

<html>
 <head>
  <title>PHP Test</title>
 </head>
 <body>
 <?php echo '<p>Hello World</p>'; ?> 
 </body>
</html>

Start server in terminal

cd /home/project
php -S 127.0.0.1:8030

Open localhost:8030/hello.php in browser

Website example

Clone GitHub repo with a PHP website, for example

git clone https://github.com/banago/simple-php-website.git

Server with PHP development server

cd simple-php-website
php -S 0.0.0.0:8030

serve-website

Composer

Install package with Composer

composer require phpunit/php-timer