Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Cara Menampilkan File TXT di WP menggunakan ID
- <?php
- $id = get_the_ID();
- echo file_get_contents( "http://example.com/files/$id.txt" );
- ?>
- You can do it like below:-
- echo file_get_contents( "http://example.com/files/$id.txt" );
- OR
- echo file_get_contents( "http://example.com/files/$id".".txt" );
- OR
- echo file_get_contents( "http://example.com/files/".$id.".txt" );
- Note:-
- Reference:- What is the difference between single-quoted and double-quoted strings in PHP?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement