Commit Graph

108 Commits

Author SHA1 Message Date
Marcus Boerger
d4f5b3f0a9 - This is PHP 6 - if this ... ever gets out 2009-03-10 23:40:06 +00:00
Sebastian Bergmann
7f4dc8702a Bump copyright year, 3 of 3. 2008-12-31 11:12:40 +00:00
Sebastian Bergmann
9b620d50b4 Bump copyright year, 2 of 2. 2007-12-31 07:12:20 +00:00
David Soria Parra
ab38cc8d89 - Add an escape parameter to fgetcsv to satisfy rfc4180 and bug #40501. 2007-10-03 10:31:04 +00:00
Hannes Magnusson
b07b4ba78b MFB: fix ifdefs 2007-01-10 15:06:58 +00:00
Sebastian Bergmann
3717df72ae Bump year. 2007-01-01 09:29:37 +00:00
Sara Golemon
78f65cc451 Unicode upgrade for fgetcsv() 2006-12-05 04:13:47 +00:00
Hannes Magnusson
851a7c6157 MFB: missing API declaration 2006-10-13 09:55:48 +00:00
Marcus Boerger
d795e0b9bb - Implement todo: SplFileObject: ability to set the CSV separator per object 2006-07-15 14:31:51 +00:00
Hartmut Holzgraefe
205bdeda41 Name change: php_get_tmpdir() renamed to sys_get_temp_dir() 2006-05-19 10:44:34 +00:00
Hartmut Holzgraefe
daa5febadf Added php_get_tmpdir() function that returns the default directory for
temporary files (as requested in bug #35380)
2006-05-06 09:59:02 +00:00
Pierre Joye
d7772d5203 - MFB: add php_mkdir_ex 2006-01-13 04:10:32 +00:00
foobar
251c5173fd bump year and license version 2006-01-01 13:10:10 +00:00
Andrei Zmievski
264cec8be6 Unicode support. 2005-08-11 23:36:07 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Anantha Kesari H Y
384a96faf6 ext/standard/file.h NetWare LibC has fnmatch and realpath implemented.
ext/standard/syslog.c Except LOG_SYSLOG other syslog macros are supported by NetWare LibC.
ext/standard/string.c NetWare fix for dirname
-- Kamesh
2005-07-15 12:35:12 +00:00
Marcus Boerger
32e478b9fc - Add fputcsv() (David Sklar) 2004-09-26 21:55:22 +00:00
Frank M. Kromann
62cd02c5a7 Adding missing PHPAPI for non ZTS builds 2004-07-30 22:49:02 +00:00
Sara Golemon
a2c24ae90e BugFix#28868 (Part Two): This fixes thread unsafety in the userspace
filters which relates to the fix just applied for userspace wrappers.
2004-06-21 21:08:05 +00:00
Sara Golemon
7fcfa8865e BugFix#28868: Wrapper hash not thread-safe.
Userdefined wrappers were being registered into a global wrapper hash
which can cross threads.  Termination of once instance then has the
potential to leave an active stream in another instance with no wrapper
leading to segfault.
2004-06-21 18:58:55 +00:00
foobar
ccfc46b0aa - Happy new year and PHP 5 for rest of the files too..
# Should the LICENSE and Zend/LICENSE dates be updated too?
2004-01-08 17:33:29 +00:00
Ilia Alshanetsky
1128955aa4 Fixed compiler warnings. 2003-12-14 18:23:15 +00:00
Stanislav Malyshev
e21669502b MF4: allow realpath() for win32 non-ZTS 2003-09-30 09:52:11 +00:00
Edin Kadribasic
6bcf810687 This needs to be exported for dynamic extensions 2003-06-15 23:27:05 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Sara Golemon
83b7b75c3c Implement default contexts. For the moment this is useless
but it will be used soon for connection pooling.
2003-05-21 04:04:50 +00:00
Sara Golemon
87c5019dd2 Switch file_put_contents 'bool use_include_path' to 'int flags' to allow other options such as appending 2003-04-08 23:24:53 +00:00
foobar
a45b4258f0 file_set_contents -> file_put_contents 2003-04-08 14:12:52 +00:00
Sterling Hughes
39b8f06f9b @ Add the file_set_contents() function, as a complement to the file_get_contents()
@ function. (Sterling)
2003-03-12 06:47:34 +00:00
Wez Furlong
1b53a2d12e New user-space functions:
. stream_socket_client() - similar to fsockopen(), but more powerful.
  . stream_socket_server() - Creates a server socket.
  . stream_socket_accept() - Accept a client connection.
  . stream_socket_get_name() - Get local or remote name of socket.

Tidy up some leaks and debug printfs.
Move more streams functions into streamsfuncs.c and streamsfuncs.h.
2003-02-28 19:53:21 +00:00
Wez Furlong
5def83df0b Move streams specific stuff from ext/standard/file.c -> ext/standard/streams.c
Move win32 select implementation into win32/.
Will update win32 build in a moment.
2003-02-27 22:23:39 +00:00
Ilia Alshanetsky
8908faa47f Revent previous patch, adding of file_write_content() was premature. 2003-02-22 20:35:22 +00:00
Ilia Alshanetsky
d2e2fbcc5b int/long change. 2003-02-22 20:33:11 +00:00
Ilia Alshanetsky
53b7b0eb8c Merged the flags for the file() function into a single flag. 2003-02-10 22:26:53 +00:00
Ilia Alshanetsky
f98ea4c46d Added feature request #9173 (added stream_get_line(), this function will
read either the specified number of bytes or until the ending string is
found).
2003-02-09 20:43:05 +00:00
Sara Golemon
7b37272381 Added stream_get_wrappers() 2003-01-03 08:02:36 +00:00
Sebastian Bergmann
b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Marcus Boerger
0d7957bc15 Bug #20433 2002-11-30 18:36:17 +00:00
Wez Furlong
7694770304 Rename streams functions to fit with naming conventions, adding aliases
for old functions where required.
Make use of recent changes to chunk size and timeout setting code.
2002-09-28 22:14:21 +00:00
Wez Furlong
315e0a599b Implement stream_select() which works just like socket_select, but only on
streams.
@ - Added stream_select() which works like socket_select but only works on
@   streams returned by fopen(), fsockopen() and pfsockopen(). (Wez)
2002-09-27 23:42:38 +00:00
Wez Furlong
c484eb8c97 Fix segfault in wrapper error log mechanism when errors are logged on
second and subsequent events.
Implement very simple recursion protection for user streams written
like this:
class urlEncodeStream {
    var $fp = NULL;

    function stream_open($path, $mode, $options, &$opened_path)
    {
        $this->fp = fopen($path, $mode); // <-- this recurses infinitely
        return is_resource($this->fp);
    }
}

file_register_wrapper('urlencode', 'urlEncodeStream');
$fp = fopen('urlencode:///tmp/outputfile.txt', 'w');

Noticed by: Yasuo.
2002-09-26 12:12:27 +00:00
Wez Furlong
4c2a9c091b Remove an unused variable and a now-unused function. 2002-09-26 10:17:41 +00:00
Wez Furlong
3a67c67737 Rename file_get_wrapper_data -> file_get_meta_data.
It now always returns useful information for all streams.
Unified that data with socket_get_status and made socket_get_status
an alias for file_get_meta_data.

Fix Location header following which was broken in this commit:
http://cvs.php.net/diff.php/php4/ext/standard/http_fopen_wrapper.c?r1=1.41&r2=1.42&ty=h
2002-09-26 10:14:41 +00:00
Wez Furlong
696e0a2301 Implement persistent streams. (for pfsockopen).
Juggle some includes/definitions.
Tidy up streams use in ext/standard/file.c
2002-09-25 15:25:12 +00:00
Wez Furlong
d14a7e0c19 WS 2002-09-23 18:13:31 +00:00
Wez Furlong
c74b9faca5 Implement a default_socket_timeout and auto_detect_line_endings ini options.
Also move user_agent from BG to FG.
2002-09-23 18:12:39 +00:00
Wez Furlong
9d348ea800 Implement filter API for streams.
Filters can be stacked onto a stream; more details will follow in docs and
on php-dev.

Implement "string.rot13" filter

Allows the following script:

$fp = fopen("file.txt", "r");
stream_filter_prepend($fp, "string.rot13");

// File contents will be subject to a rot13 transformation before
// being output.
fpassthru($fp);
fclose($fp);
2002-08-20 20:47:47 +00:00
Andi Gutmans
c28df01280 - Add TSRMLS_DC to prototype. 2002-07-08 18:44:05 +00:00
Wez Furlong
760573695c Implement user-space funtions to operate on stream contexts. 2002-04-30 00:28:24 +00:00
Wez Furlong
e1d0a14790 Implement stream context and status notification system.
Bump the BC for zlib notice to a warning
# See my RFC to php-dev a few days ago
2002-04-10 22:42:32 +00:00