The WebYep Init Code
Every page containing WebYep Elements needs a piece of PHP code that sets up the whole WebYep system. This code must be located at the very beginning of the document, before anything else – there must not even be an empty line before it in the document file.
It must also be located before the <DOCTYPE> directive. Allthough that directive also must be the first thing in the document, this will not cause any problems, as the PHP code does not reach the browser! The PHP code is processed (and "consumed") by the server and in the HTML code reaching the browser, the <DOCTYPE> will again be the first thing.
The Init Code is inserted automatically if you are using any of the supported web design apps (like Dreamweaver) and their WebYep plugin or extension. But if you are creating your pages "by hand" or at least are inserting the WebYep PHP code fragments manually, you also need to place the WebYep Init Code manually.
This is the WebYep Init Code:
(Please make sure to copy all the code, from the first "<?php" to the last "?>")
<?php // WebYep init WebYepV1
/* ><table><tr><td bgcolor=white><h2>WebYep message: Error, PHP inactive</h2>
<font color=red>The PHP code in this page can not be executed!<ul>
<li>Are you launching this page directly form your harddisc (e.g. via Dreamweavers
"Preview in Browser" instead of accessing it via a webserver?</li>
<li>Has this file the correct file extension for PHP scripts?
WebYep pages must have the ".php" extension and <b>not</b> ".html" or ".htm"!</li>
</ul></font></td></tr></table><!--
*/
$webyep_sIncludePath = "./";
$iDepth = 0;
while (!file_exists($webyep_sIncludePath . "webyep-system")) {
$iDepth++;
if ($iDepth > 10) {
error_log("webyep-system folder not found!", 0);
echo "<html><head><title>WebYep</title></head><body><b>WebYep:</b> This page can not be displayed <br>Problem: The webyep-system folder was not found!</body></html>";
exit;
}
$webyep_sIncludePath = ($webyep_sIncludePath == "./") ? ("../"):("$webyep_sIncludePath../");
}
if (file_exists("${webyep_sIncludePath}webyep-system/programm")) $webyep_sIncludePath .= "webyep-system/programm";
else $webyep_sIncludePath .= "webyep-system/program";
include("$webyep_sIncludePath/webyep.php");
// -->?>
Summary
- Every page using WebYep Elements also needs the WebYep Init Code.
- The Init Code must be the very first thing in the document.
- You do not need to care about the Init Code, if you are using one of the supported web design apps and the corresponding WebYep plugin or extension – it is placed automatically.
|