0

i am working on php-codeigniter i am using code for php script excution after connection close it working well in local server but not working in iis which is live server
this is my code

set_time_limit(0);
        ob_end_clean();
        ignore_user_abort(true);
       header("Connection: close\r\n");
       header("Content-Encoding: none\r\n");  
        ob_start();          
        echo date('Y-m-d H:i:s').PHP_EOL;
        $size = ob_get_length();   
        header("Content-Length: $size",TRUE);  
        ob_end_flush();
        ob_flush();
        flush();   
sleep(20);
file_put_contents('c:/tmp.txt', date('Y-m-d H:i:s')); 

thanks regards srikanth bollineni

1 Answer 1

1

finally i found answer ......

1>On the server main page, under "Management", select "Configuration Editor";

2>under "Section", enter 'system.webServer/handlers';

3>next to "(Collection)" click "..." OR mark the element "(Collection)" and, under "Actions" und '(Collection)' Element, click "Edit Items";

4>scroll down until you find your PHP version under "Name";

5>at the bottom, the Properties are shown an can be edited manually, including responseBufferLimit, which should be set to 0 for flush() to work.

just follwing this steps flush is working on iis..my problem is resolve

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.