18 Discussion / Question Topics

Remove Filter
Member Avatar for
Member Avatar for nevek

Hi I have a php application which runs on an IIS Server and I want to create/append a file on an other server or PC Can I do it if I use fopen and I create a folder on that other server or PC which I grant write access to …

Member Avatar for rubberman
0
257
Member Avatar for sparkthesunoff

I have two different text files, one of them contains a text, the other one works as a dictionary. The dictionary has some words line by line with their description beside them separated by a comma. I'm supposed to search for all these words in the text and then replace …

Member Avatar for Ancient Dragon
0
311
Member Avatar for nstrazimiri

hi. i want to load and read a file in php. i wrotte this code but it doesn't work. i want when the user loads a txt file, then it will be shown in the page. i can use fopen but i dont know its directory for example. any help …

Member Avatar for NardCake
0
146
Member Avatar for ibn_sumal

Hello guys, I'm trying to save/store data from a *form* to a *text file*. The problem is that the information sent from the form does not seem to be storing in the text file as whenever I enter its url the page is just empty. The code is as follows: …

Member Avatar for pritaeas
0
433
Member Avatar for kshahnazari

Im trying to open a txt file to write into it . heres the warning : Warning: fopen(C:\inetpub\wwwroot\testFile.txt): failed to open stream: Permission denied in C:\inetpub\wwwroot\get.php and heres the code $fh = fopen("C:\\inetpub\\wwwroot\\testFile.txt" , 'w'); fwrite($fh, "PHP"); what am I missing ?

Member Avatar for pritaeas
0
104
Member Avatar for joao.jose.520

Hellou. Can anyone tell me how can i save a string to a file? I have this function: void PrintGameBoard(jogo_4line*jg) { int i,n; system("clear"); printf("===============Jogo do 4 em linha===============\n\n\n"); printf(" +--+--+--+--+--+--+--+\n"); for(i=1; i<=6; i++) { printf("%d |%c |%c |%c |%c |%c |%c |%c |\n",7-i,jg->T[i][1],jg->T[i][2],jg->T[i][3],jg->T[i][4],jg->T[i][5],jg->T[i][6],jg->T[i][7]); if (i!=0) printf(" +--+--+--+--+--+--+--+\n"); } printf(" …

Member Avatar for Adak
0
227
Member Avatar for dancks

Ok. As the title says I tried many times to simply write a program that rewrites a file to remove null characters. I confirmed with a hex editor that the file in question has tons on null characters, on average about 1 of every 2 characters in null. So my …

Member Avatar for dancks
0
419
Member Avatar for volkang

Hi, I encounter an assertion error on my thesis while trying to write a line to a file. The related code is pasted below. The funny thing is that this code runs maybe 5000 times and i get the error at 5001 th time. Thank you very much for any …

Member Avatar for volkang
0
345
Member Avatar for binningen

I'm having trouble opening a file using fopen in C++. I'm using XCode 4. Here's my code: FILE *f; f = fopen("test.txt", "r"); if (f == NULL) std::cout << "Error: NULL file"; When I run this, the error message gets printed. test.txt is stored in the same directory as my …

Member Avatar for binningen
0
1K
Member Avatar for iwanna mix-mix

it gets compiled but it crushes: "programm has stopped working" Please help me!!! this is the programm: #include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { FILE *fp; int i=0, n; char allwords[100][40]; fp=fopen("fraoules.txt","r"); if ( (fp=fopen("fraoules.txt","r") )==NULL ){ printf("To arxeio den mporese na anoixtei\n"); } while(strcmp( allwords[i],"telos")!=0){ fscanf(fp, …

Member Avatar for TrustyTony
0
190
Member Avatar for cjohnweb

I have a project that, instead of using MySQL, I am supposed to use txt files to manage data. I have no say in this, I'm doing the project for a client. So I wrote a test file with functions for writing these data files, reading, etc. But it's not …

Member Avatar for cjohnweb
0
170
Member Avatar for maryam ahmad

i'm working on visual studio 2008. I'm trying use fopen to open txt files and it does not give any errors but its not doing the required task either. i've to submit this project on monday! please help here's part of the code: [CODE]#include <stdio.h> #include<iostream> #include <conio.h> #include <string> …

Member Avatar for maryam ahmad
0
1K
Member Avatar for ivan3510

Hi! I want to check if some file on some other server exists. I have this code (but something is wrong with it): [CODE]<?php $notworking=array(); $false=0; $link="http://uploads.mp3songurls.com/"; $files=glob("genre/*.xml"); foreach($files as $file){ $xml=new SimpleXMLElement($file,null,true); foreach($xml as $info){ if(fopen($link.$info->link.".mp3","r")==false){ $false++; $notworking[$false]=$info->name." => ".$info->author; } } } if($false>0){ $file=fopen("notworking.txt","w"); for($i=1;$i<=$false;$i++){ fwrite($file,$notworking[$i]."\r\n"); } fclose($file); …

Member Avatar for ivan3510
0
209
Member Avatar for vincenzorm117

Hey very simple problem. I've been searching the site to see if I did anything wrong and I had to fail because I still get the wrong results (semantic error). Problem #1: Every time I use fopen with the "w" (or write) mode the file with whatever name given is …

Member Avatar for vincenzorm117
0
1K
Member Avatar for rayden150

I tried to store several data an cant achieve it: [CODE] #include <iostream> #include <string.h> #include <stdlib.h.> #include <stdio.h> #include "estructura.h" void guardar_cliente(cliente x) { FILE*f; f= fopen("data.txt", "w"); fwrite(&x, sizeof(x), 1, f); fclose(f); } [/CODE] I dont know whats wrong im using another cpp file and a header file …

Member Avatar for mike_2000_17
0
249
Member Avatar for d_panayotov

Hello, I have this assignment in C. The problem is that the functions have to be placed in separate files instead of just one. I haven't done that before. It seems code that would have run if the program was written in one file doesn't work when the functions are …

Member Avatar for d_panayotov
0
167
Member Avatar for becka221

Hi, Im guessing this is an easy piece of code, but i cant find the answer Im looking for anywhere. I have 20 files each with a different a list of numbers (not all the same amount of numbers). Each file is called data-01.txt, data-02.txt... to data-20.txt.I need to open …

Member Avatar for vinitmittal2008
0
149
Member Avatar for Kieran Y5

Hi, Is it possible to stop the [i]fopen[/i] function from accessing a file or folder? My server uses linux but I have no control over [I].ini[/I] files as my host prevents me from accessing them. Is there any way from using a [I].htaccess[/I] or something to prevent [i]fopen[/i] from opening …

0
94

The End.