porfavor ayuda, que quiere decir ese error... ?
Como puedo saber si se crearon las cookies?
<?php
if($ss->styleCookieSet()){ print "<p>You currently have a style cookie for this page.</p>"; }
else { print "<p>You do not have a style cookie set for this page.</p>"; }
?>
No se si se puede pero dejaré la pagina para que vean: http://robballou.com/switcher/v2/example.php
example.php
Código PHP:
<?php
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', true);
ini_set('error_log', '/home/.becker/anarion/php.log');
ini_set('log_errors', true);
ob_start('ob_gzhandler');
date_default_timezone_set('America/Chicago');
?>
<html >
<head>
<title>PHP Styleswitcher, version 2</title>
<?php
// BEGIN STYLESWITCHER CODE
if(!isset($reqPath)){ $reqPath = "./"; }
require_once($reqPath ."Styleswitcher.php");
$ss = new Styleswitcher();
$ss->addStyle("basic", "basic.css", "", "", true);
$ss->addStyle("blue", "blue.css");
$ss->addStyle("green", "green.css");
$ss->addStyle("large", "large.css");
$ss->addStyle("normal", "small.css");
$ss->createSet("fonts");
$ss->addStyleToSet("fonts", "large");
$ss->addStyleToSet("fonts", "normal", true);
$ss->createSet("style");
$ss->addStyleToSet("style", "blue", true);
$ss->addStyleToSet("style", "green");
$ss->cookieDomain = ".". $_SERVER['HTTP_HOST'];
$ss->cookieName = "cwStyle";
$ss->printStyles();
// End Styleswitcher code
?>
</head>
<body>
<div>
<h1>PHP Styleswitcher, version 2</h1>
<h2>Example page</h2>
<p>This page shows how the styleswitcher works, as well as giving an example for how multiple styles can be changed. This page has <strong>five</strong> stylesheets. They break done like this:</p>
<ol>
<li> <strong>basic.css</strong> - This stylesheet is set up as "static" which means it is always present.</li>
<li> <strong>blue.css</strong> - The first of the "visual" aspects of this page (the default blue theme).</li>
<li> <strong>green.css</strong> - The second theme.</li>
<li> <strong>small.css</strong> - The default font size.</li>
<li> <strong>large.css</strong> - A larger font stylesheet.</li>
</ol>
<p>The stylesheets, except for the "basic.css" file, are broken into two sets: fonts and style.</p>
<?php
if($ss->styleCookieSet()){ print "<p>You currently have a style cookie for this page.</p>"; }
else { print "<p>You do not have a style cookie set for this page.</p>"; }
?>
<hr />
<form action="switcher.php" method="post">
<!-- Automatically redirect to the referer -->
<input type="hidden" name="referer" id="referer" value="<?php print $_SERVER['PHP_SELF']; ?>" />
<input type="hidden" name="inputStyle1" id="inputStyle1" value="fonts" />
<input type="hidden" name="inputStyle2" id="inputStyle2" value="style" />
<p>Use this form to change the style of this page:</p>
<strong>Font Style:</strong><br />
<input type="radio" name="fonts" id="fontStyle1" value="normal" <?php $ss->printSetInputChecked("fonts", "normal"); ?>/> <label for="fontStyle1">Normal text (smaller)</label>
<input type="radio" name="fonts" id="fontStyle2" value="large" <?php $ss->printSetInputChecked("fonts", "large"); ?>/> <label for="fontStyle2">Large text</label><br />
<br />
<strong>Page Style:</strong><br />
<input type="radio" name="style" id="pageStyle1" value="blue" <?php $ss->printSetInputChecked("style", "blue"); ?>/> <label for="pageStyle1">Blue</label>
<input type="radio" name="style" id="pageStyle2" value="green" <?php $ss->printSetInputChecked("style", "green"); ?>/> <label for="pageStyle2">Green</label><br />
<br />
<input type="submit" name="setChanges" value="Change styles" />
</form>
<hr />
</div>
</body>
</html>
swhitcher.php
Código PHP:
<?php
require_once("Styleswitcher.php");
$ss = new Styleswitcher('/switcher/');
$ss->addStyle("blue", "blue.css");
$ss->addStyle("green", "green.css");
$ss->addStyle("large", "large.css");
$ss->addStyle("normal", "small.css");
$ss->createSet("fonts");
$ss->addStyleToSet("fonts", "large");
$ss->addStyleToSet("fonts", "normal", true);
$ss->createSet("style");
$ss->addStyleToSet("style", "blue", true);
$ss->addStyleToSet("style", "green");
$ss->cookieDomain = ".". $_SERVER['HTTP_HOST'];
$ss->cookieName = "cwStyle";
$ss->start();
?>
Styleswitcher.php tienen que descargarlo
http://robballou.com/switcher/v2/download.php
styleswitcher.v203.php5.zip