Tue, January 25, 2022
InterServer Web Hosting and VPS
https://devcodepro.comdevcodepro
X
InterServer Web Hosting and VPS
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);
?>
rated 3 times (3) (0)
comments: 0 / hits: 1140  / 2 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
2 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: 710
1 year ago, sun, sep 6, 20, 10:58:41
/* <form id="myform"> </form> */ $(document).ready(function(){ $("#myform").on("click", function(){ $(".myclass").fadeIn(); }); });
comments: 0 / hits: 398
1 year 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: 987
1 year 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: 387