xref: /web-php/docs.php (revision cdf59074)
1<?php
2
3use phpweb\I18n\Languages;
4
5$_SERVER['BASE_PAGE'] = 'docs.php';
6include_once __DIR__ . '/include/prepend.inc';
7
8site_header("Documentation", ["current" => "docs"]);
9
10?>
11
12<h1>Documentation</h1>
13<div class="content-box">
14
15<p>
16 The PHP Manual is available online in a selection of languages.
17 Please pick a language from the list below.
18</p>
19
20<p>
21 Note, that many languages are just under translation, and
22 the untranslated parts are still in English. Also some translated
23 parts might be outdated. The translation teams are
24 <a href="https://doc.php.net/">open to contributions</a>.
25</p>
26</div>
27
28<p>
29  View Online:
30<?php
31
32// List all manual languages viewable online
33$lastlang = array_key_last(Languages::ACTIVE_ONLINE_LANGUAGES);
34foreach (Languages::ACTIVE_ONLINE_LANGUAGES as $langcode => $langname) {
35    if (!file_exists($_SERVER["DOCUMENT_ROOT"] . "/manual/{$langcode}/index.php")) {
36        continue;
37    }
38
39    // Make preferred language bold
40    if ($langcode === $LANG) { echo "<strong>"; }
41
42    echo '<a href="/manual/' . $langcode . '/">' . $langname . '</a>';
43    echo ($lastlang !== $langcode) ? ",\n" : "\n";
44
45    if ($langcode === $LANG) { echo "</strong>"; }
46}
47
48?>
49</p>
50
51<p>
52 The language currently being used as the default for you should be in
53 <strong>bold</strong> above. You can change the setting for this on the
54 <a href="/my.php">My PHP.net customization page</a>.
55</p>
56
57<p>
58 For downloadable formats, please visit our
59 <a href="download-docs.php">documentation downloads</a> page.
60</p>
61
62<p>
63 Information about php.net URL shortcuts can be found by visiting our
64 <a href="urlhowto.php">Navigation tips &amp; tricks page</a>.
65</p>
66
67<h2 class="content-header">More documentation</h2>
68<ul class="content-box listed">
69 <li>
70  If you are interested in how the documentation is edited and translated,
71  you should read the <a href="https://doc.php.net/guide/">contribution guide</a>.
72 </li>
73 <li>
74  <a href="http://pear.php.net/manual/">Documentation of PEAR and the various
75  packages</a> can be found on a separate server.
76 </li>
77 <li>
78  You can still read a copy of the original <a href="/manual/phpfi2.php">PHP/FI
79  2.0 Manual</a> on our site, which we only host for historical purposes.
80  The same applies to the <a href="/manual/php3.php">PHP 3 Manual</a>.
81 </li>
82 <li>
83  The PHP 4 and PHP 5 documentation has been removed from the
84  manual, but archived versions still exist. For
85  more information, please read <a href="/manual/php4.php">
86  Documentation for PHP 4</a> and <a href="manual/php5.php">
87  Documentation for 5</a>, respectively.
88 </li>
89</ul>
90
91<?php site_footer();
92