PHP Open File

PHP Open File

ᴰᵒᵖᵖᵉˡᵍᵃⁿᵍᵉʳ 多佩尔甘格尔

PHP fopen() function is used to open file or URL and returns resource. The fopen() function accepts two arguments: $filename and $mode. The $filename represents the file to be opended and $mode represents the file mode for example read-only, read-write, write-only etc.

Syntax

resource fopen ( string $filename , string $mode [, bool $use_include_path = false [, resource $context ]] )  

 

PHP Open File Mode


PHP Open File Example

<?php  
$handle = fopen("c:\\folder\\file.txt", "r");  
?>  

 


Report Page