Home
last modified time | relevance | path

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

12345678910>>...13

/PHP-7.4/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-7.4/ext/standard/tests/file/
H A Dfile_put_contents.phpt2 file_put_contents() and invalid parameters
10 $file = __DIR__."/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_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
14 /* Prototype : int file_put_contents(string file, mixed data [, int flags [, resource context]])
20 echo "*** Testing file_put_contents() : usage variation ***\n";
41 $res = file_put_contents($value, "Some data");
53 *** Testing file_put_contents() : usage variation ***
63 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
73 Warning: file_put_contents(): Filename cannot be empty in %s on line %d
78 Warning: file_put_contents( ): failed to open stream: Permission denied in %s on line %d
93 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
14 /* Prototype : int file_put_contents(string file, mixed data [, int flags [, resource context]])
20 echo "*** Testing file_put_contents() : usage variation ***\n";
46 $res = file_put_contents($names_arr[$i], "Some data");
60 *** Testing file_put_contents() : usage variation ***
67 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
75 Warning: file_put_contents(): Filename cannot be empty in %s on line %d
85 Warning: file_put_contents() expects parameter 1 to be a valid path, array given in %s on line %d
91 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 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_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 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";
42 file_put_contents($filename, "File in include path", FILE_USE_INCLUDE_PATH);
43 file_put_contents($filename, ". This was appended", FILE_USE_INCLUDE_PATH | FILE_APPEND);
52 *** Testing file_put_contents() : variation ***
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 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 Dbug69628.phpt21 file_put_contents("$dirname/image.jPg", '');
22 file_put_contents("$dirname/image.gIf", '');
23 file_put_contents("$dirname/image.png", '');
H A Dbug44805.phpt9 file_put_contents($file1, "this is file 1");
10 file_put_contents($file2, "this is file 2");
/PHP-7.4/ext/standard/tests/general_functions/
H A Dparse_ini_file.phpt17 file_put_contents($filename, $ini);
22 file_put_contents($filename, $ini);
28 file_put_contents($filename, $ini);
35 file_put_contents($filename, $ini);
42 file_put_contents($filename, $ini);
49 file_put_contents($filename, $ini);
56 file_put_contents($filename, $ini);
62 file_put_contents($filename, $ini);
69 file_put_contents($filename, $ini);
76 file_put_contents($filename, $ini);
[all …]
H A Dbug40752.phpt7 file_put_contents($file, '
14 file_put_contents($file, '
/PHP-7.4/ext/phar/tests/
H A Dcreate_path_error.phpt16 file_put_contents($pname . '/a.php?', "query");
17 file_put_contents($pname . '/b.php?bla', "query");
44 file_put_contents($pname . '/' . $check, "error");
69 1:Error: file_put_contents(phar://%s//): failed to open stream: phar error: file "" in phar "%s" ca…
70 2:Error: file_put_contents(phar://%s/.): failed to open stream: phar error: file "" in phar "%s" ca…
71 3:Error: file_put_contents(phar://%s/../): failed to open stream: phar error: file "" in phar "%s" …
72 4:Error: file_put_contents(phar://%s/a/..): failed to open stream: phar error: file "" in phar "%s"…
77 9:Error: file_put_contents(phar://%s): failed to open stream: phar error: invalid path "%s" contain…
78 10:Error: file_put_contents(phar://%s): failed to open stream: phar error: invalid path "%s" contai…
79 11:Error: file_put_contents(phar://%s): failed to open stream: phar error: invalid path "%s" contai…
[all …]
/PHP-7.4/Zend/tests/
H A Dbug78396.phpt2 Bug #78396: Second file_put_contents in Shutdown hangs script
7 file_put_contents(__DIR__ . '/bug78396.txt', '1', FILE_APPEND | LOCK_EX);
8 file_put_contents(__DIR__ . '/bug78396.txt', '2', FILE_APPEND | LOCK_EX);
/PHP-7.4/ext/fileinfo/tests/
H A Dcve-2014-1943-mb.phpt17 file_put_contents($fd, $a);
22 file_put_contents($fd, $b);
23 file_put_contents($fm, $m);
H A Dcve-2014-1943.phpt17 file_put_contents($fd, $a);
22 file_put_contents($fd, $b);
23 file_put_contents($fm, $m);
/PHP-7.4/sapi/fpm/tests/
H A Dlog-bwd-multiple-msgs.phpt25 file_put_contents('php://stderr', "msg 1 - ");
27 file_put_contents('php://stderr', "msg 2 - ");
29 file_put_contents('php://stderr', "msg 3");
H A Dlog-bwd-multiple-msgs-stdout-stderr.phpt27 file_put_contents('php://stdout', "msg 1 - ");
29 file_put_contents('php://stderr', "msg 2 - ");
31 file_put_contents('php://stderr', "msg 3");
/PHP-7.4/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-7.4/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-7.4/ext/opcache/tests/
H A Dbug65559.phpt12 file_put_contents($file, '<?php return 1;');
15 file_put_contents($file, '<?php return 2;');

Completed in 31 milliseconds

12345678910>>...13