如果void pass1P(char string[256]){
//f1 = test.txt /readable
//f2 = optab.txt /readable
//f3 = symtab.txt /writable
//f4 = errorLog.txt /writable
FILE *f1,*f2,*f3,*f4,*f5;
int lc,sa,l,op1,o,len,errorLen;
int j = 0;
char m1[20],la[20],op[20],otp[20];
char hex[20];
f1=fopen(string,"r");
f3=fopen("symtab.txt","w");
f4=fopen("errorLog.txt","w");
fscanf(f1,"%s %s %d",la,m1,&op1);
if(strcmp(m1,"START")==0){
sa=op1;
lc=sa;
sprintf(hex, "%x", op1);
printf("\t%s\t%s\t%s\n",la,m1,hex);
}
else{
lc=0;
fprintf(f4,"\nMissing START directive\n");
}
fscanf(f1,"%s %s",la,m1);
while(!feof(f1)){
fscanf(f1,"%s",op);
sprintf(hex, "%x", lc);
printf("\n%s\t%s\t%s\t%s\n",hex,la,m1,op);
printf("Made It");
if(strcmp(la,"-")!=0){
sprintf(hex, "%x", lc);
fprintf(f3,"\n%s\t%s\n",hex,la);
errorLen++;
}
f2=fopen("optab.txt","r");
fscanf(f2,"%s %x",otp,&o);
while(!feof(f2)){
if(strcmp(m1,otp)==0){
lc=lc+3;
j = 1;
break;
}
if((strcmp(m1,"RESW")==0)||(strcmp(m1,"WORD")==0)||(strcmp(m1,"END")==0)||(strcmp(m1,"BYTE")==0)||(strcmp(m1,"RESB")==0)){
j = 1;
break;
}
fscanf(f2,"%s %x",otp,&o);
}
if(j==0){
fprintf(f4,"\nIllegal Operand at line %s\n",hex);
}
j=0;
fclose(f2);
if(strcmp(m1,"WORD")==0){
if(strcmp(op,"-")==0){
fprintf(f4,"\nMissing operand on data storage directive at line %s\n",hex);
}
else{
lc=lc+3;
}
}
else if(strcmp(m1,"RESW")==0){
if(strcmp(op,"-")==0){
fprintf(f4,"\nMissing operand on data storage directive at line %s\n",hex);
}
else{
op1=atoi(op);
lc=lc+(3*op1);
}
}
else if(strcmp(m1,"BYTE")==0){
if(strcmp(op,"-")==0){
fprintf(f4,"\nMissing operand on data storage directive at line %s\n",hex);
}
else{
if(op[0]=='X')
lc=lc+1;
else{
len=strlen(op)-2;
lc=lc+len;}
}
}
else if(strcmp(m1,"RESB")==0){
if(strcmp(op,"-")==0){
fprintf(f4,"\nMissing operand on data storage directive at line %s\n",hex);
}
else{
op1=atoi(op);
lc=lc+op1;
}
}
fscanf(f1,"%s%s",la,m1);
}
f5=fopen("programLen.txt","w");
if(strcmp(m1,"END")==0){
printf("\nProgram length = %d\n\n",lc-sa);
fprintf(f5,"%d",lc-sa);
}
else{
printf("\nProgram length = %d\n\n",lc-sa);
fprintf(f4,"\nEND Directive not found at line %s\n",hex);
fprintf(f5,"%d",lc-sa);
}
if(errorLen>500)
fprintf(f4,"\nExceeded the 500 max distinct labels at line %s\n",hex);
fclose(f1);
fclose(f3);
fclose(f4);
fclose(f5);}
并使用数据库查询删除用户,我们可以轻松删除其他用户会话。
现在,我正在尝试在文件SESSION_DRIVER=database
中使用会话,因为我在Session中有复杂的对象。因此,它可能会导致性能问题。
有没有办法通过保留SESSION_DRIVER=file
来删除管理员的用户会话?
我正在搜索SESSION_DRIVER=file
修改 - 1
Framework正在创建唯一的文件名并将数据存储在该文件中,并将其保存在storage \ framework \ sessions中。框架如何了解哪个用户具有哪个文件名?