Run a php file when Apache starts on xampp control panel, Is it possible? -
actually, created .php file implemented queries update status , want run on apache startup(apache start on xampp command panel). if possible, please tell me details how configure , have alter settings launch php file..
thnx
xampp comes apache_start.bat
file in xampp's root directory. can edit file include next line (save backup re-create of .bat file before editing!):
php -f <path php script>
place line before line apache\bin\httpd.exe
, , script execute on apache restart.
if haven't added php.exe environmental variables, you'll have utilize total path php in command. should provide total path php script. example:
c:\xampp\php\php.exe -f c:\xampp\htdocs\your-script.php apache\bin\httpd.exe
if run problems seek running php script command line first, create sure works. may take experimentation correctly set paths, , configure permissions depending on version of windows you're using.
note you'll have run .bat file restart apache , execute script. if restart apache clicking start button in xampp command panel ignore .bat file , script not execute. (i'll update reply if figure out how execute script using xampp command panel's start button)
php apache xampp
No comments:
Post a Comment