I am still unable to get the source of error.
what all it mentions is this message.
"supplied argument is not a valid stream resource"
This error on which it is giving me an error is marked in the code
Here is the sample source code that i am working on.
I even have tried changing the permissions for this. But that solution is also not worth.
Expand|Select|Wrap|Line Numbers
- --------------------------------------------------------------------------------------------
- $filename="1_testing_clip.rm";
- $fileStream=@fopen("./temp/".$filename,"rb");
- while(!feof($fileStream))
- {
- $char=fgetc($fileStream);
- if(ord($char)>=32 && ord($char)<=127)
- {
- echo $char;
- if($char=='T' || $char=='A' || $char=='C' || $char=='D' || $char=='K' || $char=='U')
- {
- parse($char);
- }
- $char="";
- }
- }
- fclose($fileStream);
- function parse($charValue)
- {
- switch($charValue)
- {
- case 'T':
- {
- echo "T called";
- for($m=1;$m<6;$m++)
- {
- -----------------------------------
- | $character=fgetc($fileStream); |
- -----------------------------------
- $Title=$Title.$character;
- }
- if(strcmp($Title,"Title:")==0)
- {
- echo "String is equal";
- }
- break;
- }
- :
- :
- :
- :
- ---------------------------------------------------------------------------------------------------------