Skip to content

Commit 930cfea

Browse files
committed
update README
1 parent 1688857 commit 930cfea

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
## Description
44

5-
This extension is similar to the [fileinfo](https://www.php.net/manual/en/book.fileinfo.php) extension, but only one filemagic function is provided to make it a simple use.
5+
This extension is similar to the [fileinfo](https://www.php.net/manual/en/book.fileinfo.php) extension, but only one **filemagic** function is provided to make it a simple use.
66

7-
The filemagic function returns the same result as the result of the /bin/file command as a string.
7+
The **filemagic** function returns the same result as the result of the /bin/file command as a string.
88

99
## Installation
1010

@@ -159,7 +159,7 @@ text/x-c; charset=us-ascii
159159
<?php
160160
if ( ($buf = filemagic ('wrong_path')) == false ) {
161161
if ( version_comapre(PHP_VERSION, '7.2.0', '<') ) {
162-
ini_set ('track_errors', true)
162+
//ini_set ('track_errors', true) -> track_errors is SYSTEM_INI, so can't set with ini_set
163163
printf ("ERROR: %s\n", $php_errormsg);
164164
}
165165
$err = error_get_last ();
@@ -177,6 +177,6 @@ Array
177177
[line] => 2
178178
)
179179
```
180-
- $php_errormsg must have the track_errors setting enabled.
181-
- $php_errormsg was deprecated in 7.2.0.
182-
- The filemagic function does not call any error handlers when an error occurs. However, the error message is assigned to $php_errormsg or error_get_last ().
180+
- [$php_errormsg](https://www.php.net/manual/en/reserved.variables.phperrormsg.php) must have the [track_errors](https://www.php.net/manual/en/errorfunc.configuration.php#ini.track-errors) setting enabled.
181+
- [$php_errormsg](https://www.php.net/manual/en/reserved.variables.phperrormsg.php) was deprecated in 7.2.0.
182+
- The filemagic function does not call any error handlers when an error occurs. However, the error message is assigned to [$php_errormsg](https://www.php.net/manual/en/reserved.variables.phperrormsg.php) or [error_get_last ()](https://www.php.net/manual/en/function.error-get-last.php).

0 commit comments

Comments
 (0)