"Php compilation" as well as porting

I'm not interested in compiling for performance, but the ability to "compile" a php script to carry it on a USB drive or portable hard drive.

I think there can be two ways:

  • Portable apache
  • Php portable command line

I emphasize that there is some package like xampp etc., as well as using php bin files, but I was wondering if there is something more user friendly, I mean that I can just double click, open browser and use.

+3
source share
3 answers

PHP . XAMPP apache, PHP. , XAMPP , , , PHP.

, - , ...

+3

PHP.

+2

PHP 5.4+ has a built-in web server ... I was able to simply copy the php executable to a random folder and ...

# ~/someDir/php -S localhost:7676 -t ~/docRoot ENTER

PHP 5.4.0RC3 Development Server started at Tue Jan  3 15:57:33 2012
Listening on localhost:7676
Document root is /Users/localadmin/docRoot
Press Ctrl-C to quit.`

Go to http: // localhost: 7676 and you will be fine.

If you want even more portability, you can delve into the world of recompiling PHP with a build command such as ./configure --enable-static --disable-shared --disable-all

+1
source

Source: https://habr.com/ru/post/1769976/


All Articles