mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-29 12:52:02 +00:00
docs: Fixing typo on PHP sample (#8566)
This commit is contained in:
@@ -48,7 +48,7 @@ function). Then you can read a FlatBuffer binary file, which you
|
|||||||
pass the contents of to the `GetRootAsMonster` function:
|
pass the contents of to the `GetRootAsMonster` function:
|
||||||
|
|
||||||
~~~{.php}
|
~~~{.php}
|
||||||
// It is recommended that your use PSR autoload when using FlatBuffers in PHP.
|
// It is recommended that you use PSR autoload when using FlatBuffers in PHP.
|
||||||
// Here is an example:
|
// Here is an example:
|
||||||
function __autoload($class_name) {
|
function __autoload($class_name) {
|
||||||
// The last segment of the class name matches the file name.
|
// The last segment of the class name matches the file name.
|
||||||
@@ -69,7 +69,7 @@ pass the contents of to the `GetRootAsMonster` function:
|
|||||||
// Read the contents of the FlatBuffer binary file.
|
// Read the contents of the FlatBuffer binary file.
|
||||||
$filename = "monster.dat";
|
$filename = "monster.dat";
|
||||||
$handle = fopen($filename, "rb");
|
$handle = fopen($filename, "rb");
|
||||||
$contents = $fread($handle, filesize($filename));
|
$contents = fread($handle, filesize($filename));
|
||||||
fclose($handle);
|
fclose($handle);
|
||||||
|
|
||||||
// Pass the contents to `GetRootAsMonster`.
|
// Pass the contents to `GetRootAsMonster`.
|
||||||
|
|||||||
Reference in New Issue
Block a user