bonjour tout le monde,
je suis nouveau dans le monde de spaw est je dois le configurer, j'ai fait des essais mais j'ai pas abouti.
voila une partie de fichier config.php
juste les trois variables:
DOCUMENT_ROOT
SPAW_ROOT
SPAW_DIR
et dans mon code php j'ai fait le suivant:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 <?php require_once(str_replace('\\\\','/',dirname(__FILE__)).'/../class/config.class.php'); require_once(str_replace('\\\\','/',dirname(__FILE__)).'/../class/util.class.php'); // sets physical filesystem directory of web site root // if calculation fails (usually if web server is not apache) set this manually SpawConfig::setStaticConfigItem('DOCUMENT_ROOT',"C:\Program Files\EasyPHP1-8\www\mes_test"); if (!ereg('/$', SpawConfig::getStaticConfigValue('DOCUMENT_ROOT'))) SpawConfig::setStaticConfigItem('DOCUMENT_ROOT', SpawConfig::getStaticConfigValue('DOCUMENT_ROOT').'/'); // sets physical filesystem directory where spaw files reside // should work fine most of the time but if it fails set SPAW_ROOT manually by providing correct path SpawConfig::setStaticConfigItem('SPAW_ROOT', "C:\Program Files\EasyPHP1-8\www\mes_test/spaw2"); // sets virtual path to the spaw directory on the server // if calculation fails set this manually SpawConfig::setStaticConfigItem('SPAW_DIR', '/mes_test/spaw2/'.str_replace(SpawConfig::getStaticConfigValue("DOCUMENT_ROOT"),'',SpawConfig::getStaticConfigValue("SPAW_ROOT")));
et voila les erreurs qu'il me donne:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 <?php // mon premier exemple avec spaw include ( "spaw2/spaw.inc.php"); $SPAW = new SpawEditor ( "spaw1",$contenu); $Spaw-> show (); ?>
Notice: Undefined variable: contenu in c:\program files\easyphp1-8\www\mes_test\test_spaw.php on line 4
Fatal error: Call to a member function on a non-object in c:\program files\easyphp1-8\www\mes_test\test_spaw.php on line 5
Partager