Answers for "php file get content"

PHP
7

php get file contents

<?php
file_get_contents("file.txt");
?>
Posted by: Guest on May-12-2020
1

transfer file using file_get_content

file_get_contents('http://url/to/upload/handler', false, $context);
Posted by: Guest on March-24-2020
-1

php file get contents post

$postdata = http_build_query([
 	'var1' => 'some content',
    'var2' => 'doh'
]);

$opts = [
  'https' =>
    [
    	'method'  => 'POST',
        'header'  => 'Content-Type: application/x-www-form-urlencoded',
        'content' => $postdata
    ]
);

$result = file_get_contents('http://example.com/submit.php', false, stream_context_create($opts));
Posted by: Guest on October-27-2020

Browse Popular Code Answers by Language