mirror of
https://github.com/restoreddev/phpapprentice.git
synced 2025-08-13 02:04:26 +02:00
Continuing transition to hugo
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
<?php partial('header', ['title' => 'PHP Apprentice']) ?>
|
||||
|
||||
<div class="container center">
|
||||
<a href="/" class="logo-404"><?= icon('elephant') ?></a>
|
||||
<p class="message-404">Whoops! The page could not be found.</p>
|
||||
<div class="toc-404">
|
||||
<?php partial('table_of_contents') ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php partial('footer') ?>
|
@@ -1,3 +0,0 @@
|
||||
</body>
|
||||
|
||||
</html>
|
@@ -1,16 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title><?= $title ?? 'PHP Apprentice' ?></title>
|
||||
<meta name="description" content="<?= $subtitle ?? 'An online book for learning PHP' ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="stylesheet" href="<?php echo asset('css/site.css') ?>">
|
||||
<link rel="icon" href="/favicon-32.png">
|
||||
<script src="<?php echo asset('js/site.js') ?>"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
@@ -1,6 +0,0 @@
|
||||
<div class="menu">
|
||||
<button class="menu-button" title="Open Menu">
|
||||
<div class="icon"><?= icon('show-sidebar') ?></div>
|
||||
Table of Contents
|
||||
</button>
|
||||
</div>
|
@@ -1,8 +0,0 @@
|
||||
<div class="modal closed">
|
||||
<div class="modal-content">
|
||||
<button class="modal-button right" title="Close">
|
||||
<div class="icon"><?= icon('close-outline') ?></div>
|
||||
</button>
|
||||
<?php partial('table_of_contents') ?>
|
||||
</div>
|
||||
</div>
|
@@ -1,38 +0,0 @@
|
||||
<div class="table-of-contents">
|
||||
<h4>Table of Contents</h4>
|
||||
<ul class="list-plain">
|
||||
<li><a href="/">Preface</a></li>
|
||||
<li><a href="<?= page_path('installing-php') ?>">Installing PHP</a></li>
|
||||
</ul>
|
||||
|
||||
<h5 class="section-title">Basics</h5>
|
||||
<ol>
|
||||
<li><a href="<?= page_path('basics') ?>">Basics</a></li>
|
||||
<li><a href="<?= page_path('variables') ?>">Variables</a></li>
|
||||
<li><a href="<?= page_path('arithmetic') ?>">Arithmetic</a></li>
|
||||
<li><a href="<?= page_path('strings') ?>">Strings</a></li>
|
||||
<li><a href="<?= page_path('comparisons') ?>">Comparisons</a></li>
|
||||
<li><a href="<?= page_path('boolean-logic') ?>">Boolean Logic</a></li>
|
||||
<li><a href="<?= page_path('conditionals') ?>">Conditionals</a></li>
|
||||
<li><a href="<?= page_path('loops') ?>">Loops</a></li>
|
||||
<li><a href="<?= page_path('arrays') ?>">Arrays</a></li>
|
||||
<li><a href="<?= page_path('functions') ?>">Functions</a></li>
|
||||
<li><a href="<?= page_path('classes') ?>">Classes</a></li>
|
||||
<li><a href="<?= page_path('classes-inheritance') ?>">Classes: Inheritance</a></li>
|
||||
<li><a href="<?= page_path('classes-visibility') ?>">Classes: Visibility</a></li>
|
||||
<li><a href="<?= page_path('classes-constructor') ?>">Classes: Constructor</a></li>
|
||||
<li><a href="<?= page_path('static') ?>">Static</a></li>
|
||||
<li><a href="<?= page_path('interfaces') ?>">Interfaces</a></li>
|
||||
<li><a href="<?= page_path('abstract') ?>">Abstract Classes</a></li>
|
||||
<li><a href="<?= page_path('exceptions') ?>">Exceptions</a></li>
|
||||
</ol>
|
||||
|
||||
<h5 class="section-title">Web</h5>
|
||||
<ol>
|
||||
<li><a href="<?= page_path('web/http') ?>">HTTP</a></li>
|
||||
<li><a href="<?= page_path('web/http-post') ?>">HTTP POST</a></li>
|
||||
<li><a href="<?= page_path('web/http-server') ?>">PHP HTTP Server</a></li>
|
||||
</ol>
|
||||
|
||||
<a href="<?= page_path('credits') ?>">Credits</a>
|
||||
</div>
|
@@ -1,41 +0,0 @@
|
||||
<?php partial('header', ['title' => 'PHP Apprentice - Credits']) ?>
|
||||
|
||||
<div class="container small center">
|
||||
<?php partial('menu_button') ?>
|
||||
|
||||
<div>
|
||||
<h1>Credits</h1>
|
||||
<p>
|
||||
PHP Apprentice was inspired by
|
||||
<a href="https://gobyexample.com/">Go By Example</a> and by <a href="https://elixirschool.com/">Elixir School</a>. Both sites offer excellent, quality documentation in Go and Elixir and I want PHP Apprentice to provide the same
|
||||
experience for the PHP programming language.
|
||||
</p>
|
||||
<p>
|
||||
Sites used as a reference while writing PHP Apprentice:
|
||||
<ul>
|
||||
<li><a href="https://secure.php.net/" target="_blank">php.net</a></li>
|
||||
<li><a href="https://www.phptherightway.com/" target="_blank">PHP The Right Way</a></li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>
|
||||
PHP Apprentice was built using several open source projects, besides PHP itself.
|
||||
Thank you to each of these maintainers for providing great libraries!
|
||||
<ul>
|
||||
<li><a href="https://prismjs.com/" target="_blank">Prism.js</a></li>
|
||||
<li><a href="https://www.zondicons.com/" target="_blank">Zondicons by Steve Schoger</a></li>
|
||||
<li><a href="https://postcss.org/" target="_blank">PostCSS</a></li>
|
||||
<li><a href="https://symfony.com/doc/current/components/console.html" target="_blank">Symfony CLI</a></li>
|
||||
<li><a href="https://symfony.com/doc/current/frontend.html" target="_blank">Symfony Encore</a></li>
|
||||
<li><a href="https://parsedown.org/" target="_blank">Parsedown</a></li>
|
||||
</ul>
|
||||
</p>
|
||||
<hr />
|
||||
<p>
|
||||
Created and managed by <a href="https://twitter.com/restoreddev" target="_blank">Andrew Davis @restoreddev</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php partial('menu_modal') ?>
|
||||
<?php partial('footer') ?>
|
@@ -1,29 +0,0 @@
|
||||
<?php partial('header', ['title' => $title, 'subtitle' => $subtitle]) ?>
|
||||
|
||||
<div class="container small center">
|
||||
<?php partial('menu_button') ?>
|
||||
|
||||
<h1><?= escape($title) ?></h1>
|
||||
<h3 class="subtitle"><?= escape($subtitle) ?></h3>
|
||||
<?= $chapter ?>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<div class="navigate-links">
|
||||
<?php if (!empty($previous)): ?>
|
||||
<a href="<?= page_path($previous) ?>" title="Previous" id="prev-link">
|
||||
<div class="icon"><?= icon('cheveron-outline-left') ?></div>
|
||||
Previous
|
||||
</a>
|
||||
<?php endif ?>
|
||||
<?php if (!empty($next)): ?>
|
||||
<a href="<?= page_path($next) ?>" title="Next" id="next-link">
|
||||
Next
|
||||
<div class="icon"><?= icon('cheveron-outline-right') ?></div>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php partial('menu_modal') ?>
|
||||
<?php partial('footer') ?>
|
@@ -1,35 +0,0 @@
|
||||
<?php partial('header', ['title' => 'PHP Apprentice']) ?>
|
||||
|
||||
<div class="container small center">
|
||||
<div>
|
||||
<div class="home-title-wrapper">
|
||||
<div class="home-logo"><?= icon('elephant') ?></div>
|
||||
<h1 class="home-title">PHP Apprentice</h1>
|
||||
<h3 class="home-subtitle">An online book for learning PHP</h3>
|
||||
</div>
|
||||
<p>
|
||||
PHP Apprentice is an online, open source book about the PHP programming language. PHP is one of the most popular platforms for building websites and web services. It is a great language that is easy to learn and allows you to build powerful and complex web applications very quickly.
|
||||
</p>
|
||||
<p>
|
||||
The goal of PHP Apprentice is to be an easy to understand resource for learning how to write good code in PHP. There are a lot of PHP tutorials on the internet that use outdated practices or insecure code. I want this book to show how to write PHP code with quality.
|
||||
</p>
|
||||
<p>
|
||||
The contents of PHP Apprentice are for beginners and experienced PHP developers. The book currently has content for learning the basics of the language. In the future, more pages will be added for more advanced topics like building websites, database integration and security.
|
||||
</p>
|
||||
<p>
|
||||
PHP Apprentice is currently a work in progress. If you would like to give feedback or request a certain discussion topic, check out the <a href="https://github.com/restoreddev/phpapprentice" target="_blank">GitHub repository</a>.
|
||||
</p>
|
||||
<div class="home-buttons">
|
||||
<a href="<?= page_path('basics') ?>" class="button">
|
||||
<div class="icon"><?= icon('book-reference') ?></div>
|
||||
Open First Chapter
|
||||
</a>
|
||||
<?php partial('menu_button') ?>
|
||||
</div>
|
||||
<hr />
|
||||
<p>Created and managed by <a href="https://twitter.com/restoreddev" target="_blank">Andrew Davis @restoreddev</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php partial('menu_modal') ?>
|
||||
<?php partial('footer') ?>
|
@@ -1,29 +0,0 @@
|
||||
<?php partial('header', ['title' => 'PHP Apprentice - Installing PHP']) ?>
|
||||
|
||||
<div class="container small center">
|
||||
<?php partial('menu_button') ?>
|
||||
|
||||
<div>
|
||||
<h1>Installing PHP</h1>
|
||||
<h2>Windows 10</h2>
|
||||
<ol class="body-ol">
|
||||
<li>Download PHP from the <a href="https://windows.php.net/download">PHP For Windows</a> site. I recommend downloading the non-thread safe PHP 7.1 or 7.2 (unless you want to use Apache and you know if you do). You will also need to choose 32 bit (x86) or 64 bit (x64) depending on your version of Windows.</li>
|
||||
<li>Download the corresponding Visual C++ Redistributable from the same site. For PHP 7.1, it is VC14 and for PHP 7.2, it is VC15.</li>
|
||||
<li>Install the VC redistrubutable using the downloaded executable.</li>
|
||||
<li>The PHP download comes in a zip folder. Extract the zip folder into your user directory in a folder named <code>php</code>. The path should look like <code>C:\Users\username\php</code>.</li>
|
||||
<li>Next, we need to add PHP to your environment variables path. Open "System" under "Control Panel". Go to the "Advanced" tab and select "Environment Variables". In the "User variables" section, select "Path" and click the "Edit" button. You will see a list of different folder paths. Add the PHP path to the list using the "Add" button. The PHP path is the same folder where you extracted PHP.</li>
|
||||
<li>Now, you can open PowerShell or Command Prompt and type <code>php -v</code> to verify PHP was installed correctly. It will return the installed version of PHP on your system.</li>
|
||||
</ol>
|
||||
|
||||
<h2>MacOS</h2>
|
||||
<p>Good news! Each version of MacOS comes with PHP by default. However, if you are running an older version of MacOS or OS X, then you will need to manually install a new version of PHP. To check your current version, open Terminal and type <code>php -v</code>. You will need at least PHP 7.1 on your computer to use all the features in these tutorials.</p>
|
||||
<ol class="body-ol">
|
||||
<li>Install <a href="https://brew.sh/">Homebrew</a>.</li>
|
||||
<li>Run <code>brew install php</code> in Terminal.</li>
|
||||
<li>Check your version is correct by running <code>php -v</code> in Terminal.</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php partial('menu_modal') ?>
|
||||
<?php partial('footer') ?>
|
Reference in New Issue
Block a user