SHARE
TWEET

Cara Menampilkan File TXT di WP

pustakakoran Apr 26th, 2017 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Cara Menampilkan File TXT di WP menggunakan ID
  2.  
  3.  
  4. <?php
  5. $id = get_the_ID();
  6. echo file_get_contents( "http://example.com/files/$id.txt" );
  7. ?>
  8.  
  9.  
  10.  
  11.  
  12.  
  13. You can do it like below:-
  14.  
  15. echo file_get_contents( "http://example.com/files/$id.txt" );
  16. OR
  17.  
  18. echo file_get_contents( "http://example.com/files/$id".".txt" );
  19. OR
  20.  
  21. echo file_get_contents( "http://example.com/files/".$id.".txt" );
  22. Note:-
  23.  
  24. Reference:- What is the difference between single-quoted and double-quoted strings in PHP?
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top