You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
## Description
4
4
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.
6
6
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.
8
8
9
9
## Installation
10
10
@@ -159,7 +159,7 @@ text/x-c; charset=us-ascii
159
159
<?php
160
160
if ( ($buf = filemagic ('wrong_path')) == false ) {
161
161
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
163
163
printf ("ERROR: %s\n", $php_errormsg);
164
164
}
165
165
$err = error_get_last ();
@@ -177,6 +177,6 @@ Array
177
177
[line] => 2
178
178
)
179
179
```
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