Quote:
|
Originally Posted by SabrinaDeep
uhm i just realised now that you probably meant to store the whole source code of an html filer inside a variable...i didnt have much sleep last night sorry eheheh.
If you want to open an html file, and put all its source content inside a variable, you need to use the file_get_content function like this:
$url = "http://www.example.net/somepage.html";
$input = @file_get_contents($url) or die('Could not access file: $url');
Now, if the file exists, the whole source content of
somepage.html is stored inside the
$input variable
xoxoxo
Sabrina
|
you are getting on the right track
just the die('Could not access file: $url'); won't be working normally, since you have put variable inside single quot symbol
