- Clone repository to "/XAMPP/htdocs"
cd into the directory withcd "<path>/XAMPP/htdocs"
*NOTE: REPLACE with your path!
git clone https://github.com/hansintheair/BattleshipWeb.git
You should have "/XAMPP/htdocs/Battleship" when done cloning. - Open Netbeans
- Click "New Project... (Ctrl+Shift+N)"
- On the New Project Wizard -> Choose Project page
- Under Categories select "PHP"
- Under Projects select "PHP Application with Existing Sources"
- Click Next
- On the New Project Wizard -> Name and Location page
- Browse to "htdocs/BattleshipsWeb/battleship"
- Confirm project name is "battleship"
- Confirm PHP Version is "PHP 7.4"
- Click Next
- On the New Project Wizard -> Run Configuration page
- Confirm Run As is set to "Local Web Site (running on local web server)
- Confirm Project URL is set to "http://localhost/BattleshipWeb/battleship/"
- Index File is set to "Home.php"
- Click Finish
- Open MySQL Workbench
- Select your localhost db to connect to it
- On the left sidebar, under the "Administration" tab, select "Data Import/Restore"
- On the localhost Data Import page, select the "Import from Self-Contained File" radio button and set the file path to "/XAMPP/htdocs/BatteshipWeb/battleship/database/Battleships.sql"
- Click Start Import
- Refresh the Schemas on the left side and confirm that a schema called 'battleship' was created.
- Complete the steps in the Run section to test that everything is set up correctly
- Start XAMPP Apache & MySQL servers
- In Netbeans, right-click the Home.php file and select "run"
The start page to the Battleship project should open on your browser.
You should NOT see a 404 or any other error.