tsilenzio Posted July 31, 2007 Share Posted July 31, 2007 Is it possible to assign a variable to all the text inside of a file? I was thinking maybe doing what i typed below or would it have to be more complicated? =/ //<?php // <-- Enables Text Highlighting -- // $somVar = include('some/path/leading/to/some/file.php'); Quote Link to comment https://forums.phpfreaks.com/topic/62651-variable-assignment-from-file/ Share on other sites More sharing options...
tsilenzio Posted July 31, 2007 Author Share Posted July 31, 2007 anyway at all? >.> Quote Link to comment https://forums.phpfreaks.com/topic/62651-variable-assignment-from-file/#findComment-311855 Share on other sites More sharing options...
Vizor Posted July 31, 2007 Share Posted July 31, 2007 The contents of a file? Then file_get_contents() is the function you need. Quote Link to comment https://forums.phpfreaks.com/topic/62651-variable-assignment-from-file/#findComment-311858 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.