php.net/manual/en/ref.filesystem.php#ini.allow-url-fopen -> www.php.net/manual/en/ref.filesystem.php
Filesystem Functions Introduction Requirements No external libraries are needed to build this extension, but if you want PHP to support LFS (large files) on Linux, then you need to have a recent glibc and you need compile PHP with the following compiler flags: -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64. Installation There is no installation needed to use these functions; Table 1 Filesystem and Streams Configuration Options Name Default Changeable Changelog allow_url_fopen "1" PHP_INI_SYSTEM PHP_INI_ALL in PHP <= 434 Available since PHP 404 user_agent NULL PHP_INI_ALL Available since PHP 430 default_socket_timeout "60" PHP_INI_ALL Available since PHP 430 from "" PHP_INI_ALL auto_detect_line_endings "0" PHP_INI_ALL Available since PHP 430 Here's a short explanation of the configuration directives.
file() to see if it is using Unix, MS-Dos or Macintosh line-ending conventions. This enables PHP to interoperate with Macintosh systems, but defaults to Off, as there is a very small performance penalty when detecting the EOL conventions for the first line, and also because people using carriage-returns as item separators under Unix systems would experience non-backwards-compatible behaviour.
When I have some free time (sooner rather than later), I'm going to write a more in-depth script for this. You can expect a PHP 4 and PHP 5 script class dedicated to this one idea. php function breadCrumbs($path) { /** * What it does is split a path string into its two base objects -- a * file name and a directory name. That finished string * is then returned to the calling script/function for display to the * browser.
The main working function is get_dir($path,$max_depth='') Optional aguments: $max_depth : obvious it'll limit the recursive depth. Not so optional: $l=0 : the first call must omit this, or explicitly set it to 0, since it represents the starting depth $total='': the current total filesize; it should also be left alone, although it autosets itself to 0 on the first call; In order to do something with the files other than just echoing them, simply replace the echo functions with your own;
And find out the maximum file size of given application files. for example it will tell the maximum file size of ppt file that is placed in the directory. function showExtension($file){ if(is_file($file)){ $fileInfo = pathinfo($file);
Here's a little function to append a slash at the end of a path if there isn't one already. function append_slash_if_none($string) { if (ereg ("/$", $string)) { return $string;
net contributed this in response to a question on setting these variables ... However, with PHP 50, stream_get_line() will allow you to specify what line ending character to read up to.
mp3 or any other file that doesn't contain readable information. It makes use of the Character Type Extension if it's loaded, if it's not then it uses Regular Expressions.
|