04-01-2005, 17:12
|
|
|
חבר מתאריך: 03.01.05
הודעות: 840
|
|
תודה אחי...אבל סתכל מה זה עושה לי אם אני מכניס את הקוד למקום שאני צריך לשים אותו:
קוד:
Parse error: parse error, unexpected T_VARIABLE in /home/maor/public_html/js.php on line 4
קוד PHP:
<?php $filename = 'test.txt'; $somecontent = "echo "$IP""; // Let's make sure the file exists and is writable first. if (is_writable($filename)) { // In our example we're opening $filename in append mode. // The file pointer is at the bottom of the file hence // that's where $somecontent will go when we fwrite() it. if (!$handle = fopen($filename, 'a')) { echo "Cannot open file ($filename)"; exit; } // Write $somecontent to our opened file. if (fwrite($handle, $somecontent) === FALSE) { echo "Cannot write to file ($filename)"; exit; } echo "Success, wrote ($somecontent) to file ($filename)"; fclose($handle); } else { echo "The file $filename is not writable"; } ?>
ואם אני מוריד את ה " " מהפקודה שאומרת מה לרשום זה ירשום רק echo...
|