Answers for "php print file_get_contents"

PHP
0

php get and print file contents

<?php
// Read 14 characters starting from the 21st character
$section = file_get_contents('./people.txt', FALSE, NULL, 20, 14);
var_dump($section);
?>
Posted by: Guest on July-21-2021
1

file_get_contents php

function url_get_contents ($Url) {
    if (!function_exists('curl_init')){ 
        die('CURL is not installed!');
    }
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $Url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $output = curl_exec($ch);
    curl_close($ch);
    return json_decode($output,JSON_OBJECT_AS_ARRAY);
}
Posted by: Guest on August-09-2021

Code answers related to "php print file_get_contents"

Browse Popular Code Answers by Language