[Resolved] how to get content from a .txt file in functions.php
I spent hours trying to make a simple thing which work in php environement but doesn’t with wordpress :
How to open a simple .txt file and use its content within a function in the functions.php of the theme?
My basic script is :
<?php $fp = fopen ("fichier.txt", "r"); $data = fgets ($fp); fclose ($fp); ?>
Can I use this script in a function?
Thanks for any help
- The topic ‘[Resolved] how to get content from a .txt file in functions.php’ is closed to new replies.