Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Zapis kodu PHP do pliku
marcinpruciak
post
Post #1





Grupa: Zarejestrowani
Postów: 161
Pomógł: 9
Dołączył: 14.07.2008

Ostrzeżenie: (0%)
-----


Mam taki kod:

  1. <?
  2.  
  3.  $config = "<?php \n";
  4.  $config .= "if(!defined('RG_EMULATION')) { define( 'RG_EMULATION', $RGEmulation ); }\n";
  5.  $config .= "$mosConfig_MetaAuthor = '1';
  6. $mosConfig_MetaDesc = 'Joomla - portal dynamiczny i system zarządzania treścią.........';
  7. $mosConfig_MetaKeys = 'Joomla, joomla.................';
  8. $mosConfig_MetaTitle = '1';
  9.  
  10. $mosConfig_admin_expired = '1';
  11. $mosConfig_allowUserRegistration = '1';
  12. ...
  13. $mosConfig_shownoauth = '0';
  14. $mosConfig_sitename = 'joomla....';
  15. $mosConfig_smtpauth = '0';
  16. $mosConfig_smtphost = 'localhost';
  17. $mosConfig_smtppass = '';
  18. $mosConfig_smtpuser = '';
  19. $mosConfig_uniquemail = '1';
  20. $mosConfig_useractivation = '1';
  21. $mosConfig_vote = '0';";
  22.  
  23.      $config .= "setlocale (LC_TIME, $mosConfig_locale);\n";
  24.  $config .= '?>';
  25.  
  26.  
  27.  $fp = fopen("./users/conf_test.php", "w");
  28.  fputs($fp, $config, strlen($config));
  29.  fclose($fp);


A w pliku conf_test dodają się takie rzeczy:

Kod
<?php 
if(!defined('RG_EMULATION')) { define( 'RG_EMULATION',  ); }
 = '1';
 = 'Joomla - portal dynamiczny i system zarz±dzania tre¶ci±.........';
 = 'Joomla, joomla.................';
 = '1';

 = '1';
 = '1';
 = '1';

 = '900';
 = '0';
...
 = '';
 = '';
 = '1';
 = '1';
 = '0';setlocale (LC_TIME, $mosConfig_locale);
?>


Brakuje nazw zmiennych. Nie wiem co tu nie gra. Niby jest wszystko dobrze.

PS. Szczęśliwego Nowego Roku.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 19.09.2025 - 19:30