RSSAmplifier

Mike's Software Blog · Mar 7, 2019

Handling I/O errors in PHP

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

This blog post is all about how to handle errors from the PHP file_get_contents function, and others which work like it. The file_get_contents function will read the contents of a file into a string . For example: <? php $text = file_get_contents ( "hello.txt" ); echo $text ; You can try this out on the command-line like so: $ echo "hello" > hello.txt $ php test.php hello This function is widely…

Read on mike42.me

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.