Jump to content
php.lv forumi

Recommended Posts

Posted

:unsure: kaa var sataisiit, lai piemeeram:

$login = "losis";

$info = "liels zaabaks";

 

ierakstaas failaa users.php

$user['losis']="liels zaabaks";

 

luudzu, paliidziet pats netieku gudrs kaa lai to izdatra!

Posted
<?php
  $login = "losis";
  $info = "liels zaabaks";
  $f = fopen('users.php', 'w');
  fwrite($f, '$user[\''.$login.'\']="'.$info.'"');
  fclose($f);
?>

Neaizmirsti tikai pārliecināties (tb pārbaudīt), ka $login nesatur ' simbolu un $info " simbolu.

×
×
  • Create New...