error with php extension

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
NilayKomal
Forum Newbie
Posts: 5
Joined: Tue Jan 29, 2008 10:39 pm

error with php extension

Post 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);
}

}
Post Reply