Page 1 of 1

error with php extension

Posted: Sun Feb 03, 2008 11:19 pm
by NilayKomal
Hello frnds,
I m trying to open a file using php extension. but whenerver i use that extension it gives an error like this.
"unhandled win32 exception occured in http.exe[600]"

code of php extension
ZEND_FUNCTION(user_limit)
{

FILE *fp1;
fp1=NULL;
fp1 = fopen("d:/prac.txt","r");
char *temp = "";
char ch;
int i=0;
if(fp1==NULL)
{
temp="not there";

}
else
{
//temp="there";
//fread( temp, sizeof( char ), 3, fp1 );
fgets( temp,5 ,fp1 );
//RETURN_STRING(temp,true);
}

}