Simulating multiple requests via ajax, I've found that there is always a problem. If you enter the browser console and run the code below, a request will be made within the loop.
setInterval(function()
{
$('div').each(function()
{
$.get( 'url interna' , function( data )
{
$('html').text( 'data' )
});
})
} , 100 )
Each request for ajax will be written to a log file, but at a certain point a Permission denied or Invalid argument error is triggered. I've tried via file_get_contents
, file_put_contents
, fopen
, fwrite
and always some error occurs.
The manipulation of the files works correctly, I write and read without problems. I looped 1000 and no error occurs during recording.
for( $i = 1; $i <= 1000; $i++ )
{
$fp = fopen( 'file.txt' , 'w' );
fwrite( $fp , 'texto' );
fclose( $fp );
}