If you haven't already, download and unzip project2.zip
Use WinSCP to connect to our remote server.
Details about your specific server, userid and password were emailed to you. Here is the general information:
ftp.sienasellbacks.com
or ftp.breimer.net
userid@sienasellbacks.com
or userid@breimer.net
Be sure to replace userid
with your actual Siena userid; But, do not add @siena.edu
projects
folder to your remote server by dragging the folder from left to right. This should include both project1
and project2
http://www.sienasellbacks.com/userid/projects/project2/
or http://www.breimer.net/userid/projects/project2/
into Chrome.page1.php
make_page
Open functions.php
in Brackets
For the following part, write you answers in a PHP comment on line 2 of file you just opened.
echo
do?page_name
being printed?file_get_contents
do? Read about it here: php.net/file-get-contentsmake_page
function?make_page
Open page1.php
in Brackets
For the following part, write you answers in a PHP comment on line 2 of file you just opened.
functions.php
?page_name
of the web page we are making?page1.html
in Bracketspage2.html
h2
tag with the content "Page 2"p
tag with some random words as the content.page2.html
page1.php
again.page2.php
.make_page
function call to "Sample Page 2"page2.php
.project2
folder to the the remote server using WinSCPhttp://www.sienasellbacks.com/userid/projects/project2/
or http://www.breimer.net/userid/projects/project2/
into Chrome.page2.php
and make sure it includes your random content.make_page
is essentially a template for making a web page that has three content areas:
class="col-12"
lg
), the nav, article and aside use 3, 6 and 3 column units to create a 3-column layout.sm
), the nav and article use 3 and 9 column units to create a 2-column layout and the aside uses 12 units which pushes it down to the next row.Make the following changes to the template:
make_page($page_name, $side_menu, $page_content, $aside_content, $style = null)By giving it the value
null
, this parameter becomes optional, so you we do not have to modify the
function calls. But if you add a 5th parameter, you can use the $style
variable to slice some CSS code into the template.$page_name
is sliced into the title
tag,
slice the $style
immediately above the body
tag so that it is right below the link tags.
page2.php
to add the following embedded CSS as 5th parameter to the template:make_page('Sample Page 2', 'sidemenu.html', 'page2.html', 'relatedlinks.html', '<style>a {color: pink;}</style>');
$main_content
inside the main container of the template.page3.php
that uses page1.html
as the main article content but passes null
as side_menu and aside_content parameters.
page3.php
Rather than load the navbar and footer from files, you can replace the file_get_contents
functions with your own defined functions for generating your navigation menus.
Here are examples of how these functions can be implemented: functions.txt
None. To get credit for lab you must work productively for the 2 hour period.
While it is OK to help other students with concepts and general trouble-shooting, you should not share code. It is expected that each individual project will be unique.