Sat, June 10, 2023
https://devcodepro.comdevcodepro
Home · Latest · Trends
3

fwrite - Write new line in text file

<?php
$ip = $_SERVER['REMOTE_ADDR'];
$ip = $ip . PHP_EOL;
$file = "text.txt";
$fh = fopen($file, 'a');
fwrite($fh, $ip);
fclose($fh);
?>
AD ยท www.interserver.net/r/240055 

Interserver | Standard & VPS Cloud Hosting | $2.50 /Month

Flexible VPS hosting platform to deploy your online projects. Economical and balanced between processor cores, memory and storage
rated 3 times (3) (0)
comments: 0 / hits: 1538  / 3 years ago, sun, mar 8, 20, 06:58:05
More From » PHP
 

Comments

There are no comments for this Snippet yet
Only authorized users can post. Please sign in first, or register a free account
Login with Google
 
Share
Posted
suppe
Member since Feb 16, 2020
Total Code Snippets: 5
Total Comments: 2
Location: New Britain, Connecticut
suppe snippets
3 years ago, tue, mar 10, 20, 4:06:17
javascript:(function(){f='https://www.reddit.com/submit?url='+encodeURIComponent(window.location.href)+'&title='+encodeURIComponent(document.title);a=function(){if(!window.open(f+'noui=1&jump=doclose','enter','location=yes,links=no,scrollbars=no,toolbar=no,width=660,height=480,top=220,left=220'))location.href=f+'jump=yes'};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})()
comments: 0 / hits: 964
3 years ago, sun, sep 6, 20, 10:58:41
/* <form id="myform"> </form> */ $(document).ready(function(){ $("#myform").on("click", function(){ $(".myclass").fadeIn(); }); });
comments: 0 / hits: 625
3 years ago, sun, sep 27, 20, 5:47:13
<div><a class="showhidelink">Show / Hide</a></div> <div class="showhide" style="display:none">Content</div> <script> $(document).ready(function() { $('.showhidelink').click(function(e) { $('.showhide').toggle(); }); }); </script>
comments: 0 / hits: 1293
3 years ago, mon, oct 12, 20, 1:27:34
<div class="row align-items-start"> <div class="col-lg-2 align-self-center"> column </div> <div class="col-lg-7 align-self-center"> column </div> <div class="col-lg-3 align-self-center"> column </div> </div>
comments: 0 / hits: 650