Questions tagged [fwrite]

fwrite stands for file write. It is a function available with PHP, C, C++, etc. for writing the contents of string to the file stream pointed to by handle.

fwrite stands for file write. It is a function available with PHP, C, C++, etc. for writing the contents of string to the file stream pointed to by handle.

PHP fwrite

Visual Studio fwrite

C++ fwrite

1762 questions
0
votes
1 answer

fwrite php script into a file

Basically, I can write html tags/text etc etc to the file. All that is fine. However, I need to be able to write some actual php into the file and I'm completely oblivious of how I should go about doing this. Anyway here is what I have got to help…
Roy
  • 3,027
  • 4
  • 29
  • 43
0
votes
0 answers

php continue function when fwrite finished

I need to join two csv files and then read entire merged file. the problem is php keeps executing function when fwrite doing it's job. so when fwrite starts a pause/halt is needed. static function dictionary($path) { $language_pack =…
mhesabi
  • 1,140
  • 3
  • 22
  • 48
0
votes
1 answer

PHP not writing a Base64 image to html file

I have this string of data with some chords and their names: $html="< img…
bfb 1985
  • 29
  • 1
0
votes
1 answer

How to write to different file when file size becomes bigger than 50gb

My current code: $fileone= fopen("fileone.sql", "r"); //opens file fileone.sql $fileonewrite = fopen("fileone.rdf", "w"); //this is the file to write to $fileNum=1; $i=0; while (!feof($fileone) ) { //feof = while not end of file if ($contents…
0
votes
4 answers

can form has two actions to php?

I'm just playing around with the form action and php. I'm not good at them, just starting to learn and recently I was playing around with the fopen, fwrite and fclose. Also playing around with basic form filling then php calls out what is…
Dora
  • 6,776
  • 14
  • 51
  • 99
0
votes
1 answer

fwrite or error_log not working with background task with CLI &

I have a basic php script that will write/log to a text document
Andrew Park
  • 1,489
  • 1
  • 17
  • 26
0
votes
2 answers

fwrite() doesn't working with php files

$fp = fopen('a.html', 'w'); fwrite($fp, 'Done'); works well but $fp = fopen('b.php', 'w'); fwrite($fp, 'Done'); isn't working. What can be the possible solution? Thanks in avance. Update: 1: echo fwrite($fp, 'Done') prints 4. No errors. And the…
Cool Brain
  • 647
  • 2
  • 8
  • 14
0
votes
3 answers

records come one by one very slowly and incomplete

I have an issue with my code This script writes the variable to a csv file. I m getting the parameter trough via HTTP GET, the problem is each records comes one by one very slowly. It should be able to take a batch of thousands of records. I also…
user1789769
0
votes
0 answers

Scalability of preg_match and copy to file

I wrote some code to find a specific word between two HTML tags, and then copy the names into a text file. It works on small HTML files. The problem is that it doesn't work on large files (22 MB), (at some point its stops running and no file is…
BenB
  • 2,747
  • 3
  • 29
  • 54
0
votes
1 answer

PHP doesn't write a file to dir with +rw permissions

I have a simple .php file: This works fine, but when I need to write the file in a subfolder…
user1843376
  • 535
  • 2
  • 7
  • 12
0
votes
1 answer

Add content header to fwrite / fopen / fclose process

I'm writing to a .json file and I need to include headers so I can access it without problems. The headers I need to add to the index.php file : header('Content-Type: application/json'); header('Access-Control-Allow-Origin: *'); The snippet of code…
dbalram
  • 27
  • 2
  • 8
0
votes
1 answer

Trying to create a text file with information.

I am trying to make some statistics in a text document. I need to have a new unique text document for each item, so therefor I have not made any text documents for now. But I got this function which I call with the unique ID for the item. function…
Jackie Honson
  • 1,419
  • 3
  • 13
  • 12
0
votes
3 answers

Write XHR data with line break

I get some data from a variable, and send it via XHR to PHP file which write it in to a file. How can I make a line break in the file after every write to it? var e='Hello…
Aleksov
  • 1,200
  • 5
  • 17
  • 27
0
votes
1 answer

PHP table creation in fwrite HTML

I have created an HTML form that passes information to a PHP file. I have used fwrite to create an HTML file that includes variables from the form. In order to create a table I have this: for($i = 0; $i < count($docresult); $i++){ echo "$i.…
kadeshiseraph
  • 65
  • 1
  • 8
0
votes
2 answers

fwrite fails with invalid argument when writing a vector array

I'm having problems when trying to write a vector of structs to a file. void Obj::Write(wchar_t const* filename) { FILE* file; errno_t err = _wfopen_s(&file, filename, L"wb"); assert (file && !err); assert (sizeof(VertexData_VNT) ==…
Gareth
  • 85
  • 1
  • 5
1 2 3
99
100