![]() Topic awaiting preservation: Can you tell a php file to run on the server, from another php file? (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: Australia |
![]() Is this at all possible? I want to have one php file where i do something and press a button, then it tells another php file to run on the server - but separate from this file. So if it was doing something that took a long time it would just do it on the server by itself once called and i could close the page i called it from/turn off my pc etc. |
Maniac (V) Mad Scientist From: Rochester, New York, USA |
![]() http://us2.php.net/manual/en/ref.exec.php |
Bipolar (III) Inmate From: Australia |
![]() Thanks War, youve been a big help today! Yeh it is just running a program in the background i guess... i guess it depends how the server is set up at my hosting too. |
Paranoid (IV) Inmate From: Sthlm, Sweden |
![]() The php file is parsed & executed by the php engine at runtime, meaning as it's called through the webserver of your choice. It does not have to output anything to the browser though so it can run silently as well. Often the case when you call a php function periodically through cron jobs. Then you can simply tell cron to fire up lynx and go to the correct url and the script runs. |
Bipolar (III) Inmate From: Australia |
![]() Yeh that makes sense... i guess i was thinking of running the php file rather than an executable since you can already run php files so it shouldnt be restricted... i guess it depends if that shell is enabled. |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
![]() Is there a reason not to just use the server logs? I mean the IP and page hits are being recorded there anyway. |
Bipolar (III) Inmate From: Australia |
![]() Hmm i don't know about them, is that the same for all servers? Im on a windows hosting server, how do you access these logs? |
Maniac (V) Mad Scientist From: Rochester, New York, USA |
![]() For access to the logs you would need to talk to your provider. They should be able to tell you where they are and how you can access them. |
Bipolar (III) Inmate From: Australia |
![]() Ahh k, i have sent them an email... I noticed a directory below the root of my site called logs, it has a bunch of subdirectories with names like 'W3SVC8855' but my access is denied to them |
Bipolar (III) Inmate From: Australia |
![]() Well i got a response.... quote:
|