FCKeditor petit prob a mon avis vite réglé.

Résolu
RENAUDBL Messages postés 6 Date d'inscription jeudi 4 mars 2004 Statut Membre Dernière intervention 10 février 2007 - 7 févr. 2007 à 04:29
RENAUDBL Messages postés 6 Date d'inscription jeudi 4 mars 2004 Statut Membre Dernière intervention 10 février 2007 - 7 févr. 2007 à 06:30
Bonjour, je
vous explique mon problème.





J’ai
installé sur l’un de mes serveurs FCKeditor, tout fonctionne bien, j’arrive a éditer
une page distante jusque la pas de problèmes.





Mais quelqu’un
pourrait me dire comment faire pour que FC editor charge la page à l’ouverture
du prog.




J’ai essayé
avec la fonction include mais cela ne fonctionne pas ?



J’ai
indiqué d’un *** l’endroit qui pose problème, je vous remercie d’avance






Voici mes code :







<?php








            include("FCKeditor/fckeditor.php")
;







?><html>







<head>







<meta http-equiv="Content-Type"
content="text/html; charset=windows-1252">







<title>Test</title>







</head>














<?php








            include("UserFiles/pages.txt")
;







?>







<?php








            if($question
1) {







?>







<form action="savedata.php"
method="post" target="_blank">







<?php







$oFCKeditor = new FCKeditor('FCKeditor1');







$oFCKeditor->Width='78%';







$oFCKeditor->Height='50%';







$oFCKeditor->BasePath = 'FCKeditor/';







$oFCKeditor->Value = '***';







$oFCKeditor->Create() ;







$oFCKeditor->Config['SkinPath'] = $sBasePath
. 'editor/skins/' . htmlspecialchars($_GET['Skin']) . '/' ;







?>














<?php








           
  }

       








            if($question
1) {







?><?php }?>







</form>














</html>

8 réponses

vilhjalms Messages postés 591 Date d'inscription mercredi 20 juillet 2005 Statut Membre Dernière intervention 16 juillet 2009 2
7 févr. 2007 à 06:23
Saell og blesuð

Lol remplacez :



$handle=fopen('/UserFiles/pages.txt','r');

par

$handle=fopen('UserFiles/pages.txt','r');

C'est une erreur dans le chemin de pages.txt

Vilhjálms Sigurðsdóttir aka Frëyjá
3
vilhjalms Messages postés 591 Date d'inscription mercredi 20 juillet 2005 Statut Membre Dernière intervention 16 juillet 2009 2
7 févr. 2007 à 04:58
Saell og blesuð

peut etre faut il donner le contenu de la page à $oFCKeditor->Value=

Vilhjálms
Sigurðsdóttir aka Frëyjá
0
RENAUDBL Messages postés 6 Date d'inscription jeudi 4 mars 2004 Statut Membre Dernière intervention 10 février 2007
7 févr. 2007 à 05:29
Merci de ta réponse,

Oui en effet c'est ce qu'il faudrait faire mais je n'y arrive pas.

Le prob, c'est comment intégrer les donnés d'un fichier texte qui a déja été édité.

J'ai essayer plusieur variable mais rien ne fait, le fichier que je doit charger se trouve dans le répertoire : UserFiles/pages.txt

La variable à changer:



$oFCKeditor->Value = '***';








J'ai essayé ceci mais cela ne fonctionne pas:
$page=


'UserFiles/pages.txt'




$oFCKeditor->Value = '$page';








mais cela ne fonctionne pas, il m'affiche le texte


UserFiles/pages.txt au lieu de m'afficher la page?

J'ai également essayer avec include:


$page=


'UserFiles/pages.txt'




$oFCKeditor->Value = include '$page';

La il me charge bien la page mais au dessus de l'editeur et non dans le champs d'edition?

Help ?!?
0
vilhjalms Messages postés 591 Date d'inscription mercredi 20 juillet 2005 Statut Membre Dernière intervention 16 juillet 2009 2
7 févr. 2007 à 05:56
Saell og blesuð

$handle=fopen('/UserFiles/pages.txt','r');
$contents='';
while(!feof($handle)){
    $contents.=fread($handle, 8192);
}




$oFCKeditor->Value = $contents;









Vilhjálms
Sigurðsdóttir aka Frëyjá
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
RENAUDBL Messages postés 6 Date d'inscription jeudi 4 mars 2004 Statut Membre Dernière intervention 10 février 2007
7 févr. 2007 à 06:05
merci mais cela ne fonctionne pas .

la page se recharge sans affiche des erreurs sans sesse et à répétition.

<?php
$handle=fopen('/UserFiles/pages.txt','r');
$contents='';
while(!feof($handle)){
    $contents.=fread($handle, 8192);
}

$oFCKeditor->Value = $contents;
$oFCKeditor = new FCKeditor('FCKeditor1');
$oFCKeditor->Width='650px';
$oFCKeditor->Height='400px';
$oFCKeditor->BasePath = 'FCKeditor/';
$oFCKeditor->Value = $contents;
$oFCKeditor->Create() ;
$oFCKeditor->Config['SkinPath'] = $sBasePath . 'editor/skins/' . htmlspecialchars($_GET['Skin']) . '/' ;

?>
0
vilhjalms Messages postés 591 Date d'inscription mercredi 20 juillet 2005 Statut Membre Dernière intervention 16 juillet 2009 2
7 févr. 2007 à 06:10
Saell og blesuð

Quelles erreurs ?


Vilhjálms
Sigurðsdóttir aka Frëyjá
0
RENAUDBL Messages postés 6 Date d'inscription jeudi 4 mars 2004 Statut Membre Dernière intervention 10 février 2007
7 févr. 2007 à 06:16
Warning: fopen() [function.fopen]: Unable to access /UserFiles/pages.txt in /home/composeweb/www/index.php25

Warning: fopen(/UserFiles/pages.txt) [function.fopen]: failed to open stream: No such file or directory in /home/composeweb/www/index.php on line 25

Warning: feof(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 27

Warning: fread(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 28

Warning: feof(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 27

Warning: fread(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 28

Warning: feof(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 27

Warning: fread(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 28

Warning: feof(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 27

Warning: fread(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 28

Warning: feof(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 27

Warning: fread(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 28

Warning: feof(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 27

Warning: fread(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 28

Warning: feof(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 27

Warning: fread(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 28

Warning: feof(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 27

Warning: fread(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 28

Warning: feof(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 27

Warning: fread(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 28

Warning: feof(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 27

Warning: fread(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 28

Warning: feof(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 27

Warning: fread(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 28

Warning: feof(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 27

Warning: fread(): supplied argument is not a valid stream resource in /home/composeweb/www/index.php on line 28


...
et cela continue en permenance.....
0
RENAUDBL Messages postés 6 Date d'inscription jeudi 4 mars 2004 Statut Membre Dernière intervention 10 février 2007
7 févr. 2007 à 06:30
Merci venais de piger l'erreur en effet comme cela cela fonctionne nikel. thx man
0
Rejoignez-nous