SEEM4570 Tutorial 07: Filezilla and PHP Cao Yuewen ywcao@se.cuhk.edu.hk 2017.11.09
Outline Use FileZilla to upload and download files from the server Interact with MariaDB using PHP e.g. connect to database
FileZilla FileZilla is a free software, cross-platform FTP application, consisting of FileZilla Client and FileZilla Server. Client binaries are available for Windows, Linux, and macOS. server binaries are available for Windows only. The client supports FTP, SFTP and FTPS (FTP over SSL/TLS).
FileZilla Download Download Page: https://filezilla-project.org/ Download FileZilla Client
FileZilla Download Download correct version of FileZilla Client FileZilla is enough to use, no need for Filezilla Pro
Connect to network Enter the domain name in the Host field, then type in the username and password Click “Quickconnect” Now, you connect to SEEM department server.
Connect to network There are two accounts that can be used: s4570_07 & s4570_08 Disk Quota for each account: 300MB Account and password information can be found in: http://www-std.se.cuhk.edu.hk/~s4570_07/account&password.php
Connect to network The right side of the Filezilla client window is a list of all the files and folders on server The left side is folders and files on local computer Your computer folders Server folders Server files Your computer files
Upload Files Select one or more files from the left side panel to be uploaded and right click on them. From the menu that shows up, click the Upload button
Download Files Select one or more files from the right side panel to be downloaded and right click on them. From the menu that shows up, click the Download button
Outline Use FileZilla to upload and download files from the server Interact with MariaDB using PHP e.g. connect to database
MariaDB The environment is already setup in SEEM department server. You can directly use it with the given user name and password. Put your php file under folder ~/public_html !!!
Connect to Database Upload your .php file under folder ~/public_html Database name &password can be found in the next slide Open a browser and type the URL to check the result http://www-std.se.cuhk.edu.hk/~<username>/file
Connect to Database There are two databases: s4570_07 & s4570_08 Database username and password can be found in: http://www-std.se.cuhk.edu.hk/~s4570_07/account&password.php
Connect to Database helloworld.php Hostname username Database name Password of database Save this as helloworld.php and upload it in Filezilla
Connect to Database Open a browser, type the URL to make sure the connection is OK. Since we use SEEM server, the address should be: http://www-std.se.cuhk.edu.hk/~s4570_07/helloworld.php
Question Time