GD77 Posted July 21, 2012 Share Posted July 21, 2012 Hello: Been trying for a long to make or find a way to code a loader, PHP loader without ajax, JS or what ever just pure PHP anyone got an idea if it s possible of anyone found a solution? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/266043-loader/ Share on other sites More sharing options...
scootstah Posted July 21, 2012 Share Posted July 21, 2012 Define loader. Quote Link to comment https://forums.phpfreaks.com/topic/266043-loader/#findComment-1363277 Share on other sites More sharing options...
GD77 Posted July 21, 2012 Author Share Posted July 21, 2012 any content you want to load mainly php codes that takes time to be parsed.... Quote Link to comment https://forums.phpfreaks.com/topic/266043-loader/#findComment-1363282 Share on other sites More sharing options...
xyph Posted July 21, 2012 Share Posted July 21, 2012 Still blank here. Why do you need an application to execute long-running PHP scripts? Why not just disable max execution in the script? Quote Link to comment https://forums.phpfreaks.com/topic/266043-loader/#findComment-1363300 Share on other sites More sharing options...
KevinM1 Posted July 21, 2012 Share Posted July 21, 2012 Even better - why don't you give us an example of what you're trying to do? Quote Link to comment https://forums.phpfreaks.com/topic/266043-loader/#findComment-1363302 Share on other sites More sharing options...
GD77 Posted July 21, 2012 Author Share Posted July 21, 2012 just simple when ever you have long php codes being parsed you can post a msg like wait or smtg just without the use of JS or ajax... would it be possible?.... Quote Link to comment https://forums.phpfreaks.com/topic/266043-loader/#findComment-1363318 Share on other sites More sharing options...
KevinM1 Posted July 21, 2012 Share Posted July 21, 2012 I think what we're all trying to get at is, what are you doing that's causing that kind of delay? In most normal cases, long execution time is the result of poorly written code, either PHP code itself, or PHP code that generates a ton of unneeded SQL queries. To (not) answer the question, I'm not sure if you can do what you want. PHP doesn't have true asynchronous behavior as far as I'm aware. I'm not sure if it would be possible to fork processes, and if it were possible, if the two would be able to interact. Quote Link to comment https://forums.phpfreaks.com/topic/266043-loader/#findComment-1363329 Share on other sites More sharing options...
xyph Posted July 21, 2012 Share Posted July 21, 2012 The connection opens, code gets parsed, data gets sent, and it closes. There's no way to 'update' the client on progress without some sort of client-side checking, or forcing a connection to remain open. Neither of these are possible with PHP alone, from what I understand. Quote Link to comment https://forums.phpfreaks.com/topic/266043-loader/#findComment-1363331 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.