简体   繁体   中英

how to deploy phar file on a webserver like xampp

I am using maven with php and packaging my code to phar archive and deploy it on xampp. In java we copy war files for webapp folder of application server like tomcat. How do I do that in php? do i just go and put the .phar in xampp/htdocs folder ?

Thanks

You need to tell Apache that it should run .phar files with PHP:

cat /etc/apache2/mods-enabled/php5.conf |head -n3
<IfModule mod_php5.c>
    <FilesMatch "\.ph(ar|p3?|tml)$">
      SetHandler application/x-httpd-php

See http://cweiske.de/tagebuch/phar-webserver.htm for more details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM