two type of file get contents in php

by Francis 2013-05-02 17:47:31

1. From Url
Suppose you give url in file_get_contents, its display view source content.

<?php
echo file_get_contents('http://YOUR_HOST/YOURDIR/FILE.php');
?>


2. From File Path
Suppose you give file path in file_get_contents, its shows your source code.

<?php
echo file_get_contents('path/to/YOURDIR/FILE.php');
?>

1020
like
0
dislike
0
mail
flag

You must LOGIN to add comments