Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online

streams.php stream make seekable function syntax tag tutorial 2013





Alert! Connect with 10,000 Chating Online. Join Now

Php streams.php stream make seekable () function

Write your php code

 
<?php ?>

Php Result


Your code below



(no version information, might be only in CVS)

php_stream_make_seekable -- Convert a stream into a stream is seekable

Syntax

int php_stream_make_seekable ( php_stream * origstream, php_stream ** newstream, int flags )

php_stream_make_seekable() checks if origstream is seekable. If it is not, it will copy the data into a new temporary stream. If successful, newstream is always set to the stream that is valid to use, even if the original stream was seekable.

flags allows you to specify your preference for the seekable stream that is returned: use PHP_STREAM_NO_PREFERENCE to use the default seekable stream (which uses a dynamically expanding memory buffer, but switches to temporary file backed storage when the stream size becomes large), or use PHP_STREAM_PREFER_STDIO to use "regular" temporary file backed storage.

Table 63-1. php_stream_make_seekable() return values

ValueMeaning
PHP_STREAM_UNCHANGEDOriginal stream was seekable anyway. newstream is set to the value of origstream.
PHP_STREAM_RELEASEDOriginal stream was not seekable and has been released. newstream is set to the new seekable stream. You should not access origstream anymore.
PHP_STREAM_FAILEDAn error occurred while attempting conversion. newstream is set to NULL; origstream is still valid.
PHP_STREAM_CRITICALAn error occurred while attempting conversion that has left origstream in an indeterminate state. newstream is set to NULL and it is highly recommended that you close origstream.

Note: If you need to seek and write to the stream, it does not make sense to use this function, because the stream it returns is not guaranteed to be bound to the same resource as the original stream.

Note: If you only need to seek forwards, there is no need to call this function, as the streams API will emulate forward seeks when the whence parameter is SEEK_CUR.

Note: If origstream is network based, this function will block until the whole contents have been downloaded.

Note: NEVER call this function with an origstream that is reference by a file pointer in a PHP script! This function may cause the underlying stream to be closed which could cause a crash when the script next accesses the file pointer!

Note: In many cases, this function can only succeed when origstream is a newly opened stream with no data buffered in the stream layer. For that reason, and because this function is complicated to use correctly, it is recommended that you use php_stream_open_wrapper() and pass in PHP_STREAM_MUST_SEEK in your options instead of calling this function directly.

Php streams.php stream make seekable Function syntax tag

streams.php stream make seekable php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online



Php streams.php stream make seekable syntax tutorial

php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.


Function index

Variables

Expressions

Operators

Control-Structures

Cookies

Array

Date & Time

Directory function

File

Image

Operators

Form data handling

Mathematics operators

Mail

Php Mysql

Network Functions

Strings

php tutorial guides,functions, classes, code examples and tags for creating simple dynamic site to mysql database driven sites
 
 
Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online