Home
last modified time | relevance | path

Searched refs:file_put_contents (Results 1 – 25 of 235) sorted by relevance

12345678910

/PHP-5.6/tests/security/
H A Dopen_basedir_file_put_contents.phpt9 test_open_basedir_before("file_put_contents");
11 var_dump(file_put_contents("../bad/bad.txt", "Hello World!"));
12 var_dump(file_put_contents(".././bad/bad.txt", "Hello World!"));
13 var_dump(file_put_contents("../bad/../bad/bad.txt", "Hello World!"));
14 var_dump(file_put_contents("./.././bad/bad.txt", "Hello World!"));
15 var_dump(file_put_contents($initdir."/test/bad/bad.txt", "Hello World!"));
17 test_open_basedir_after("file_put_contents");
25 *** Testing open_basedir configuration [file_put_contents] ***
34 Warning: file_put_contents(../bad/bad.txt): failed to open stream: %s in %s on line %d
39 Warning: file_put_contents(.././bad/bad.txt): failed to open stream: %s in %s on line %d
[all …]
/PHP-5.6/ext/standard/tests/file/
H A Dfile_put_contents.phpt2 file_put_contents() and invalid parameters
10 $file = dirname(__FILE__)."/file_put_contents.txt";
14 var_dump(file_put_contents($file, $context));
15 var_dump(file_put_contents($file, new stdClass));
16 var_dump(file_put_contents($file, new foo));
18 var_dump(file_put_contents($file, "string", 0, $fp));
25 Warning: file_put_contents(): supplied resource is not a valid stream resource in %s on line %d
30 Warning: file_put_contents(): supplied resource is not a valid Stream-Context resource in %s on lin…
H A Dfile_put_contents_variation3.phpt2 Test file_put_contents() function : usage variation - different types for context.
7 /* Prototype : int file_put_contents(string file, mixed data [, int flags [, resource context]])
13 echo "*** Testing file_put_contents() : usage variation ***\n";
121 var_dump( file_put_contents($absFile, $data, null, $value) );
130 *** Testing file_put_contents() : usage variation ***
149 Error: 2 - file_put_contents() expects parameter 4 to be resource, double given, %s(%d)
153 Error: 2 - file_put_contents() expects parameter 4 to be resource, double given, %s(%d)
169 Error: 2 - file_put_contents() expects parameter 4 to be resource, array given, %s(%d)
173 Error: 2 - file_put_contents() expects parameter 4 to be resource, array given, %s(%d)
177 Error: 2 - file_put_contents() expects parameter 4 to be resource, array given, %s(%d)
[all …]
H A Dfile_put_contents_variation1.phpt2 Test file_put_contents() function : variation - test append flag
7 /* Prototype : int file_put_contents(string file, mixed data [, int flags [, resource context]])
13 echo "*** Testing file_put_contents() : variation ***\n";
20 var_dump(file_put_contents($filename, $data));
21 var_dump(file_put_contents($filename, $extra, FILE_APPEND));
26 file_put_contents($filename, $data);
36 *** Testing file_put_contents() : variation ***
H A Dfile_get_contents_file_put_contents_basic.phpt2 Test file_put_contents() and file_get_contents() functions : basic functionality
11 /* Prototype: int file_put_contents( string $filename, mixed $data[, int $flags[, resource $contex…
18 echo "*** Testing the basic functionality of file_put_contents() and file_get_contents() functions …
22 $file_name = "/file_put_contents.tmp";
24 file_put_contents( $file_path.$file_name, $text_buffer );
31 file_put_contents( $file_path.$file_name, "");
39 unlink($file_path."/file_put_contents.tmp");
43 *** Testing the basic functionality of file_put_contents() and file_get_contents() functions ***
H A Dfile_put_contents_variation8-win32.phpt2 Test file_put_contents() function : usage variation - obscure filenames
12 /* Prototype : int file_put_contents(string file, mixed data [, int flags [, resource context]])
18 echo "*** Testing file_put_contents() : usage variation ***\n";
39 $res = file_put_contents($value, "Some data");
51 *** Testing file_put_contents() : usage variation ***
61 Warning: file_put_contents(): Filename cannot be empty in %s on line %d
66 Warning: file_put_contents(): Filename cannot be empty in %s on line %d
71 Warning: file_put_contents(): Filename cannot be empty in %s on line %d
76 Warning: file_put_contents( ): failed to open stream: Permission denied in %s on line %d
91 Warning: file_put_contents(/no/such/file/dir): failed to open stream: %s in %s on line %d
[all …]
H A Dfile_put_contents_variation8.phpt2 Test file_put_contents() function : usage variation - obscure filenames
12 /* Prototype : int file_put_contents(string file, mixed data [, int flags [, resource context]])
18 echo "*** Testing file_put_contents() : usage variation ***\n";
40 $res = file_put_contents($names_arr[$i], "Some data");
53 *** Testing file_put_contents() : usage variation ***
60 Warning: file_put_contents(): Filename cannot be empty in %s on line %d
64 Warning: file_put_contents(): Filename cannot be empty in %s on line %d
68 Warning: file_put_contents(): Filename cannot be empty in %s on line %d
78 Warning: file_put_contents() expects parameter 1 to be a valid path, array given in %s on line %d
84 Warning: file_put_contents(%sdir): failed to open stream: %s in %s on line %d
[all …]
H A Dfile_get_contents_file_put_contents_error.phpt2 Test file-get_contents() and file_put_contents() functions : error conditions
10 /* Prototype: int file_put_contents( string $filename, mixed $data[, int $flags[, resource $context…
23 print( file_put_contents() );
24 print( file_put_contents($file_path."/".__FILE__) );
26 $file_handle = fopen($file_path."/file_put_contents.tmp", "w");
28 print( file_put_contents("abc.tmp", 12345, 1, $file_handle, "extra_argument") );
32 file_put_contents($file_path."/file_put_contents1.tmp", "Garbage data in the file");
42 unlink($file_path."/file_put_contents.tmp");
57 Warning: file_put_contents() expects at least 2 parameters, 0 given in %s on line %d
59 Warning: file_put_contents() expects at least 2 parameters, 1 given in %s on line %d
[all …]
H A Dfile_put_contents_variation9.phpt2 est file_put_contents() function : usage variation - linked files
12 /* Prototype : int file_put_contents(string file, mixed data [, int flags [, resource context]])
18 echo "*** Testing file_put_contents() : usage variation ***\n";
36 file_put_contents($filename,"");
49 var_dump(file_put_contents($file, $data));
50 var_dump(file_put_contents($file, $extra, FILE_APPEND));
59 *** Testing file_put_contents() : usage variation ***
H A D004.phpt2 file_put_contents() test
11 echo file_put_contents("TEST1", file_get_contents(__FILE__)) !== FALSE ? 'OK' : 'FAIL';
15 $ret = file_put_contents("TEST2", $int);
25 $ret = file_put_contents("TEST3", $int);
34 $ret = file_put_contents("TEST4", __FILE__);
43 $ret = @file_put_contents("TEST5", $_SERVER);
H A Dfile_put_contents_variation6.phpt2 Test file_put_contents() function : variation - include path testing
7 /* Prototype : int file_put_contents(string file, mixed data [, int flags [, resource context]])
13 echo "*** Testing file_put_contents() : variation ***\n";
43 file_put_contents($filename, (binary) "File in include path", FILE_USE_INCLUDE_PATH);
44file_put_contents($filename, (binary) ". This was appended", FILE_USE_INCLUDE_PATH | FILE_APPEND);…
53 *** Testing file_put_contents() : variation ***
H A Dfile_put_contents_variation7-win32.phpt2 Test file_put_contents() function : usage variation - various absolute and relative paths
12 /* Prototype : int file_put_contents(string file, mixed data [, int flags [, resource context]])
18 echo "*** Testing file_put_contents() : usage variation ***\n";
62 $res = file_put_contents($dir."\\".$filename, ($data + $i));
86 *** Testing file_put_contents() : usage variation ***
102 Warning: file_put_contents(%sfilePutContentsVar7.dir\filePutContentsVar7Sub\..\\\filePutContentsVar…
107 Warning: file_put_contents(%sfilePutContentsVar7.dir\filePutContentsVar7Sub\BADDIR\FileGetContentsV…
124 Warning: file_put_contents(BADDIR\FileGetContentsVar7.tmp): failed to open stream: %s in %s on line…
H A Dfile_put_contents_variation7.phpt2 Test file_put_contents() function : usage variation - various absolute and relative paths
7 /* Prototype : int file_put_contents(string file, mixed data [, int flags [, resource context]])
13 echo "*** Testing file_put_contents() : usage variation ***\n";
54 $res = file_put_contents($dir."/".$filename, ($data + $i));
78 *** Testing file_put_contents() : usage variation ***
94 Warning: file_put_contents(%sfilePutContentsVar7.dir/filePutContentsVar7Sub/..///filePutContentsVar…
99 Warning: file_put_contents(%sfilePutContentsVar7.dir/filePutContentsVar7Sub/BADDIR/FileGetContentsV…
116 Warning: file_put_contents(BADDIR/FileGetContentsVar7.tmp): failed to open stream: %s in %s on line…
H A Dbug69628.phpt21 file_put_contents("$dirname/image.jPg", '');
22 file_put_contents("$dirname/image.gIf", '');
23 file_put_contents("$dirname/image.png", '');
H A Dftruncate.phpt8 file_put_contents($filename, "some test data inside");
20 file_put_contents($filename, "some test data inside");
32 file_put_contents($filename, "some test data inside");
H A Dfile_get_contents_file_put_contents_variation2.phpt2 Test file_get_contents() and file_put_contents() functions : usage variations - use_include_path
11 /* Prototype: int file_put_contents( string $filename, mixed $data[,int $flags[, resource $context]…
28 file_put_contents( $filename, $buffer );
30 file_put_contents( $filename, $buffer, FILE_APPEND, NULL );
31 file_put_contents( $filename, $data_array, FILE_APPEND, NULL );
/PHP-5.6/ext/standard/tests/general_functions/
H A Dparse_ini_file.phpt19 file_put_contents($filename, $ini);
24 file_put_contents($filename, $ini);
30 file_put_contents($filename, $ini);
37 file_put_contents($filename, $ini);
44 file_put_contents($filename, $ini);
51 file_put_contents($filename, $ini);
58 file_put_contents($filename, $ini);
64 file_put_contents($filename, $ini);
71 file_put_contents($filename, $ini);
78 file_put_contents($filename, $ini);
[all …]
H A Dbug40752.phpt7 file_put_contents($file, '
14 file_put_contents($file, '
/PHP-5.6/ext/phar/tests/
H A Dcreate_path_error.phpt17 file_put_contents($pname . '/a.php?', "query");
18 file_put_contents($pname . '/b.php?bla', "query");
45 file_put_contents($pname . '/' . $check, "error");
70 1:Error: file_put_contents(phar://%s//): failed to open stream: phar error: file "" in phar "%s" ca…
71 2:Error: file_put_contents(phar://%s/.): failed to open stream: phar error: file "" in phar "%s" ca…
72 3:Error: file_put_contents(phar://%s/../): failed to open stream: phar error: file "" in phar "%s" …
73 4:Error: file_put_contents(phar://%s/a/..): failed to open stream: phar error: file "" in phar "%s"…
78 9:Error: file_put_contents(phar:///%s): failed to open stream: phar error: invalid path "%s" contai…
79 10:Error: file_put_contents(phar:///%s): failed to open stream: phar error: invalid path "%s" conta…
80 11:Error: file_put_contents(phar:///%s): failed to open stream: phar error: invalid path "%s" conta…
[all …]
H A Dphar_oo_compressed_002.phpt33 file_put_contents($pname . '/b', b'new b');
34 file_put_contents($pname . '/c', b'new c', 0, $context);
35 file_put_contents($pname . '/d', b'new d');
36 file_put_contents($pname . '/e', b'new e', 0, $context);
H A Dphar_oo_compressed_002b.phpt33 file_put_contents($pname . '/b', b'new b');
34 file_put_contents($pname . '/c', b'new c', 0, $context);
35 file_put_contents($pname . '/d', b'new d');
36 file_put_contents($pname . '/e', b'new e', 0, $context);
/PHP-5.6/ext/fileinfo/tests/
H A Dcve-2014-1943.phpt17 file_put_contents($fd, $a);
22 file_put_contents($fd, $b);
23 file_put_contents($fm, $m);
/PHP-5.6/ext/standard/tests/strings/
H A Dphp_strip_whitespace.phpt12 file_put_contents($filename, $data);
16 file_put_contents($filename, $data);
36 file_put_contents($filename, $data);
/PHP-5.6/sapi/cgi/tests/
H A D010.phpt17 file_put_contents($f, '<?php
24 file_put_contents($f, '<?php
30 file_put_contents($f, '<?php
/PHP-5.6/ext/phar/tests/zip/
H A Dcreate_new_and_modify.phpt16 file_put_contents($pname . '/a.php', "brand new!\n");
32 file_put_contents($pname .'/a.php', "modified!\n");
33 file_put_contents($pname .'/b.php', "another!\n");

Completed in 25 milliseconds

12345678910