>在這篇特定的文章中,我們將演示一個解決方案,以安裝Phalcon和PHP的多個版本,並在單個Web服務器上運行它們。 PHP 5.5.x和5.6.x將在此處使用,但是您可以用其他版本替換它們。任何支持PHP-FPM的服務器都足夠,但我們建議使用NGINX。本教程中使用的環境是Fedora OS - 一個Linux系統,但對於任何其他 *NIX OS。
鑰匙要點- >利用nginx和php-fpm在單個服務器上運行多個版本的PHP,如PHP 5.5.5.x和Fedora OS上的5.6.x所示。
- 確保安裝了所有必要的開發工具和庫,例如GCC,Make和libtool,以成功地從源構建PHP。 >克隆來自GitHub的PHP源代碼訪問多個PHP版本,並使用`。 /configure`腳本與特定選項(例如'–Enable-fpm`為php-fpm支持)配置它們。
- 在單獨的目錄(/opt/php-5.5`,`/opt/php-5.6`)中安裝和配置不同的PHP版本以隔離它們並避免衝突。 >
- >將NGINX配置修改為基於服務器名稱將流量引向不同的PHP版本,允許同時託管多個需要不同PHP環境的應用程序。
- >初步註釋
- 本教程將涵蓋PHP 5.5.x的安裝,並使用Phalcon 1.3.x和Php 5.6.x,帶有Phalcon 2.0.0。我們還將構建一些其他PHP擴展,例如APC,memcache,memcached和ioncube。 >安裝nginx
然後,我們為Nginx創建系統啟動鏈接並開始
建立php
從PHP開始之前,我們需要安裝構建php5的先決條件:
GCC或其他一些編譯器套件。
sudo yum install nginxlibc-dev,提供C標準庫,包括標題。
make,這是PHP使用的構建管理工具。
sudo chkconfig nginx on sudo service nginx start>
> libtool,幫助我們管理共享庫。
>野牛(2.4或更高),用於生成PHP解析器。
(可選)RE2C,用於生成PHP Lexer。由於GIT存儲庫已經包含生成的lexer,因此只有在您想對其進行更改時才需要RE2C。- >
- >在CentOS/Fedora上,您可以使用以下命令安裝所有這些:
- 然後,我們需要獲取其源代碼。有兩種方法:您可以從PHP的下載頁面下載存檔,也可以從GitHub中克隆Git存儲庫。
>我們建議您從git中查看源代碼,因為它為您提供了一種簡單的方法,可以使安裝保持最新狀態並使用不同版本嘗試代碼。如果要提交補丁或拉動請求,則還需要結帳。
克隆存儲庫,在您的終端中運行以下命令:>
sudo yum install nginx默認情況下,您將在主分支上,因此,如果要移至開發版本,則需要檢查穩定的分支。例如。
sudo chkconfig nginx on sudo service nginx start>進入單個構建步驟之前,我們必須執行一些“默認” PHP構建的命令。這僅對於git的構建才是必要的。
>
sudo yum install gcc libxml2-devel libXpm-devel gmp-devel libicu-devel t1lib-devel aspell-devel openssl-devel bzip2-devel libcurl-devel libjpeg-devel libvpx-devel libpng-devel freetype-devel readline-devel libtidy-devel libxslt-devel libmcrypt-devel pcre-devel curl-devel mysql-devel ncurses-devel gettext-devel net-snmp-devel libevent-devel libtool-ltdl-devel libc-client-devel postgresql-devel bison gcc make./ buildConf生成配置腳本。這可能需要幾分鐘。
我認為,將整個Web服務器存儲在單個目錄中是最好的,因此我在此處使用 /選擇。打開終端並鍵入以下命令。
>通過上述步驟生成./configure腳本後,您可以使用它來自定義PHP構建。您可以使用–HELP列出所有受支持的選項:
sudo mkdir /opt/source && cd /opt/source git clone git@github.com:php/php-src.git && cd php-src
>上面的命令將列出各種通用選項,所有基於AutoConf的配置腳本都支持這些通用選項。其中一個已經提到 - prefix = dir,它更改了Make Install使用的安裝目錄。另一個有用的選項是-c,它將緩存config.cache文件中各種測試的結果,並加快後續的./configure調用。只有一旦您已經有了工作構建,並且想快速在不同的配置之間進行更改。
<span> PHP 5.3: git checkout PHP-5.3 </span><span> PHP 5.4: git checkout PHP-5.4 </span><span> PHP 5.6: git checkout PHP-5.6 </span><span> PHP HEAD: git checkout master </span>這是一些有用的設置:
完成準備後,我們安裝了PHP版本5.6。運行以下內容:
sudo ./buildconf>最後一個開關(–enable-fpm)使該PHP版本可與PHP-FPM一起使用。如果您想將此PHP-FPM版本與Apache一起使用,請使用-with-fpm-user = apache和-with-with-fpm group = apache。另一方面,如果您想與Nginx一起使用此PHP-FPM版本,請使用-with-fpm-user = nginx和-with-with-fpm group = nginx。
應該在終端中打印成功的消息:
>sudo mkdir -p /opt/php-5.6 sudo mkdir -p /opt/php-5.5
現在,您可以使用Make來執行實際的彙編:
此操作的主要結果將是啟用SAPI的PHP二進製文件(默認情況下,SAPI/CLI/PHP和SAPI/CGI/PHP-CGI),以及模塊/目錄中的共享擴展。
現在,您可以通過使用-prefix Configuration運行“ MAKE INSTAL”將PHP安裝到 /usr /local(默認)或其他目錄中。在這種情況下,是/OPT/PHP-5.6./configure --help
請注意,MAKE INSTARM不會創建INI文件。
[...] Usage: ./configure [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print `checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for `--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or `..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [/usr/local] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, `make install' will install all the files in `/usr/local/bin', `/usr/local/lib' etc. You can specify an installation prefix other than `/usr/local' using `--prefix', for instance `--prefix=$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] [...]>
>複製php.ini和php-fpm.conf到正確的目錄:
我們再一次驗證並檢查PHP版本。
./configure \ --prefix=/opt/php-5.6 \ --with-pdo-pgsql \ --with-zlib-dir \ --with-freetype-dir \ --enable-mbstring \ --with-libxml-dir=/usr \ --enable-soap \ --enable-calendar \ --with-curl \ --with-mcrypt \ --with-zlib \ --with-gd \ --with-pgsql \ --disable-rpath \ --enable-inline-optimization \ --with-bz2 \ --with-zlib \ --enable-sockets \ --enable-sysvsem \ --enable-sysvshm \ --enable-pcntl \ --enable-mbregex \ --with-mhash \ --enable-zip \ --with-pcre-regex \ --with-mysql \ --with-pdo-mysql \ --with-mysqli \ --with-png-dir=/usr \ --enable-gd-native-ttf \ --with-openssl \ --with-fpm-user=nginx \ --with-fpm-group=nginx \ --with-libdir=lib64 \ --enable-ftp \ --with-imap \ --with-imap-ssl \ --with-kerberos \ --with-gettext \ --with-gd \ --with-jpeg-dir=/usr/lib/ --enable-fpm>
sudo yum install nginx
> open/opt/php-5.6/etc/php-fpm.conf並調整收聽行中的設置。您必須更改為未使用的端口(例如9001; Fedora可能正在使用9000端口9000)
sudo chkconfig nginx on sudo service nginx start
sudo yum install gcc libxml2-devel libXpm-devel gmp-devel libicu-devel t1lib-devel aspell-devel openssl-devel bzip2-devel libcurl-devel libjpeg-devel libvpx-devel libpng-devel freetype-devel readline-devel libtidy-devel libxslt-devel libmcrypt-devel pcre-devel curl-devel mysql-devel ncurses-devel gettext-devel net-snmp-devel libevent-devel libtool-ltdl-devel libc-client-devel postgresql-devel bison gcc make
> init腳本設置
>您可能需要為新的PHP-FPM創建一個初始腳本。幸運的是,PHP 5.3已經為您提供了它,只需將INIT腳本複製到您的目錄並更改權限:
:sudo mkdir /opt/source && cd /opt/source git clone git@github.com:php/php-src.git && cd php-src
您的初始腳本已經準備就緒。現在,您可以啟動,停止和重新加載php-fpm:
<span> PHP 5.3: git checkout PHP-5.3 </span><span> PHP 5.4: git checkout PHP-5.4 </span><span> PHP 5.6: git checkout PHP-5.6 </span><span> PHP HEAD: git checkout master </span>構建第二個PHP(5.5.x)
我們打開終端並鍵入以下命令。
>
sudo ./buildconf建築物php phalcon擴展
>要安裝包括phalcon 2.0在內的多個版本的phalcon,我們需要安裝Zephir
sudo mkdir -p /opt/php-5.6 sudo mkdir -p /opt/php-5.5有很多方法可以安裝PHP擴展。我們將使用phpize構建。
PHPIZE扮演與用於PHP構建的./buildconf腳本相似的角色:首先,它將通過從$ prefix/lib/php/build複製文件來將PHP構建系統導入擴展名。其中包括acinclude.m4(php的M4宏),phpize.m4(將重命名為擴展程序中的配置。 然後,Phpize將調用AutoConf生成一個./configure文件,該文件可用於自定義擴展構建。例如安裝備忘錄,您必須添加 - 啟用 - 磁性。
>記住!在構建擴展時,您必須指定 - wish-php-config選項(除非您只有單個全局安裝PHP)。否則。 /configure將無法正確確定PHP版本和標誌。此外,php-config腳本還確保“ make install”命令將將生成的 *.SO文件移至右擴展名目錄。
構建第一個php phalcon(2.0)
請檢查它是否成功
安裝擴展程序後。您仍然需要通過將其包括在php.ini文件中來激活它。
./configure --help
構建第二個php phalcon(1.3.x)
[...] Usage: ./configure [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print `checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for `--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or `..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [/usr/local] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, `make install' will install all the files in `/usr/local/bin', `/usr/local/lib' etc. You can specify an installation prefix other than `/usr/local' using `--prefix', for instance `--prefix=$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] [...]
我們再次檢查以確保安裝成功
./configure \ --prefix=/opt/php-5.6 \ --with-pdo-pgsql \ --with-zlib-dir \ --with-freetype-dir \ --enable-mbstring \ --with-libxml-dir=/usr \ --enable-soap \ --enable-calendar \ --with-curl \ --with-mcrypt \ --with-zlib \ --with-gd \ --with-pgsql \ --disable-rpath \ --enable-inline-optimization \ --with-bz2 \ --with-zlib \ --enable-sockets \ --enable-sysvsem \ --enable-sysvshm \ --enable-pcntl \ --enable-mbregex \ --with-mhash \ --enable-zip \ --with-pcre-regex \ --with-mysql \ --with-pdo-mysql \ --with-mysqli \ --with-png-dir=/usr \ --enable-gd-native-ttf \ --with-openssl \ --with-fpm-user=nginx \ --with-fpm-group=nginx \ --with-libdir=lib64 \ --enable-ftp \ --with-imap \ --with-imap-ssl \ --with-kerberos \ --with-gettext \ --with-gd \ --with-jpeg-dir=/usr/lib/ --enable-fpm
配置nginx
[...] creating libtool appending configuration tag "CXX" to libtool Generating files configure: creating ./config.status creating main/internal_functions.c creating main/internal_functions_cli.c +--------------------------------------------------------------------+ | License: | | This software is subject to the PHP License, available in this | | distribution in the file LICENSE. By continuing this installation | | process, you are bound by the terms of this license agreement. | | If you do not agree with the terms of this license, you must abort | | the installation process at this point. | +--------------------------------------------------------------------+ Thank you for using PHP. config.status: creating php5.spec config.status: creating main/build-defs.h config.status: creating scripts/phpize config.status: creating scripts/man1/phpize.1 config.status: creating scripts/php-config config.status: creating scripts/man1/php-config.1 config.status: creating sapi/cli/php.1 config.status: creating sapi/fpm/php-fpm.conf config.status: creating sapi/fpm/init.d.php-fpm config.status: creating sapi/fpm/php-fpm.service config.status: creating sapi/fpm/php-fpm.8 config.status: creating sapi/fpm/status.html config.status: creating sapi/cgi/php-cgi.1 config.status: creating ext/phar/phar.1 config.status: creating ext/phar/phar.phar.1 config.status: creating main/php_config.h config.status: executing default commands
以下配置將創建兩個服務器:phalcon-prd.localhost在php 5.5.5.x和phalcon-dev.localhost上運行,可與PHP 5.6.x一起使用。這是一個示例,您可以將其自定義為所需的任何內容,請參閱Nginx文檔
make
設置本地主機文件
sudo make install如果您使用的是Linux系統,則可以編輯主機文件:
新主機文件看起來像。
/opt/php-5.6/bin/php --ini Configuration File (php.ini) Path: /opt/php-5.6/lib Loaded Configuration File: (none) Scan for additional .ini files in: (none) Additional .ini files parsed: (none)
這個攔截了phalcon-dev.localhost和phalcon-prd.localhost的所有請求。測試
>用於測試,我們創建了一個名為test.php的新文件,並將其放入與上述NGINX配置相對應的文件夾中。在每個文件中,我們添加以下命令。
sudo yum install nginx
現在,在每個服務器中運行test.php文件,我們在http://phancon-dev.localhost http://phancon-prd.localhost/test.php上看到一個phalcon 1.3.x phpinfo( ) /test.php應該有Phalcon 2.0.x.
的phpinfo()
總結
在本教程中,我們了解瞭如何在服務器上輕鬆地在服務器上輕鬆運行多個主動運行版本的PHP版本,每個版本在必要時都有自己的一組不同的擴展名。如果您進行共享託管,或者您需要支持古老的舊應用程序,同時可以在尖端版本上開發和部署。
>在下面的評論中留下您的反饋,一如既往,如果您喜歡的話,請分享本文!>經常詢問有關在一台服務器上運行多個PHP版本的問題
>如何在Ubuntu 18.04上使用Apache和PHP-FPM在一台服務器上運行多個PHP版本?安裝所需的PHP版本和Apache。然後,您需要配置Apache來為每個站點使用PHP-FPM版本。您可以通過編輯每個站點的Apache配置文件並設置ProxyPassMatch指令以使用正確的PHP-FPM池來執行此操作。之後,您需要為每個PHP版本創建一個PHP-FPM池。最後,重新啟動apache和php-fpm以應用更改。 >如何在服務器上的不同php版本之間切換?
>您可以使用A2ENMOD在服務器上的不同PHP版本之間切換和a2dismod命令。 A2ENMOD命令啟用一個模塊,A2Dismod命令禁用模塊。要切換到其他PHP版本,您需要禁用當前的PHP版本並啟用所需的PHP版本。之後,您需要重新啟動apache應用更改。
>如何運行具有不同版本的PHP的不同網站?
以運行具有不同版本的PHP的不同網站,您需要配置每個網站以使用不同的PHP版本。您可以通過編輯每個網站的Apache配置文件來做到這一點,並設置ProxyPassMatch指令以使用正確的PHP-FPM池。之後,您需要為每個PHP版本創建一個PHP-FPM池。最後,重新啟動apache和php-fpm以應用更改。 >
>如何使用Apache和PHP-FPM和PHP-FPM在Fedora 35上安裝多個PHP版本? apache。然後,您需要配置Apache來為每個站點使用PHP-FPM版本。您可以通過編輯每個站點的Apache配置文件並設置ProxyPassMatch指令以使用正確的PHP-FPM池來執行此操作。之後,您需要為每個PHP版本創建一個PHP-FPM池。最後,重新啟動Apache和php-fpm以應用更改。
>我如何使用PHPENV管理多個PHP版本?
您可以使用PHPENV通過安裝PHPENV和PHP版本來管理多個PHP版本。必需的PHP版本。然後,您可以使用PHPENV命令在不同的PHP版本之間切換。您還可以使用PHPENV Global命令設置全局PHP版本,而PHPENV LOCAL命令為特定目錄設置本地PHP版本。
>如何檢查服務器上的當前PHP版本?您可以通過在終端中運行PHP -V命令來檢查服務器上的當前PHP版本。此命令將顯示當前的PHP版本和有關PHP安裝的其他信息。 >
>如何在服務器上安裝特定的PHP版本?>您可以在服務器上安裝特定的PHP版本通過使用apt-get安裝命令,然後使用所需的PHP版本的軟件包名稱。例如,要安裝PHP 7.2,您將運行命令apt-get install php7.2。通過編輯Apache配置文件並設置ProxyPassMatch指令以使用正確的PHP-FPM池來使用特定的PHP版本。之後,您需要重新啟動apache應用更改。
>如何為特定的PHP版本創建PHP-fpm池?特定的PHP版本是通過在/etc/php/7.2/fpm/pool.d/ directory中創建新的池配置文件。配置文件應包含PHP-FPM池的設置,例如收聽地址和端口,用戶和組以及Process Manager設置。
>我如何在運行多個PHP版本上的問題上解決問題。一台服務器?
您可以通過選中APACHE和PHP-FPM錯誤日誌在一台服務器上運行多個PHP版本的問題進行故障排除。錯誤日誌可以提供有關Apache配置或PHP-FPM池的任何問題的信息。您還可以使用php -v命令檢查當前的PHP版本和A2enMod命令,以檢查啟用了哪些PHP模塊。
>以上是如何在一台服務器上運行多個版本的PHP的詳細內容。更多資訊請關注PHP中文網其他相關文章!

TheSecretTokeEpingAphp-PowerEdwebSiterUnningSmoothlyShyunderHeavyLoadInVolvOLVOLVOLDEVERSALKEYSTRATICES:1)emplactopCodeCachingWithOpcachingWithOpCacheToreCescriptexecution Time,2)使用atabasequercachingCachingCachingWithRedataBasEndataBaseLeSendataBaseLoad,3)

你應該關心DependencyInjection(DI),因為它能讓你的代碼更清晰、更易維護。 1)DI通過解耦類,使其更模塊化,2)提高了測試的便捷性和代碼的靈活性,3)使用DI容器可以管理複雜的依賴關係,但要注意性能影響和循環依賴問題,4)最佳實踐是依賴於抽象接口,實現鬆散耦合。

是的,優化papplicationispossibleandessential.1)empartcachingingcachingusedapcutorediucedsatabaseload.2)優化的atabaseswithexing,高效Quereteries,and ConconnectionPooling.3)EnhanceCodeWithBuilt-unctions,避免使用,避免使用ingglobalalairaiables,並避免使用

theKeyStrategiestosigantificallyBoostPhpaPplicationPerformenCeare:1)UseOpCodeCachingLikeLikeLikeLikeLikeCacheToreDuceExecutiontime,2)優化AtabaseInteractionswithPreparedStateTementStatementStatementAndProperIndexing,3)配置

aphpdepentioncontiveContainerIsatoolThatManagesClassDeptions,增強codemodocultion,可驗證性和Maintainability.itactsasaceCentralHubForeatingingIndections,因此reducingTightCightTightCoupOulplingIndeSingantInting。

選擇DependencyInjection(DI)用於大型應用,ServiceLocator適合小型項目或原型。 1)DI通過構造函數注入依賴,提高代碼的測試性和模塊化。 2)ServiceLocator通過中心註冊獲取服務,方便但可能導致代碼耦合度增加。

phpapplicationscanbeoptimizedForsPeedAndeffificeby:1)啟用cacheInphp.ini,2)使用preparedStatatementSwithPdoforDatabasequesies,3)3)替換loopswitharray_filtaray_filteraray_maparray_mapfordataprocrocessing,4)conformentnginxasaseproxy,5)

phpemailvalidation invoLvesthreesteps:1)格式化進行regulareXpressecthemailFormat; 2)dnsvalidationtoshethedomainhasavalidmxrecord; 3)


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

SublimeText3 英文版
推薦:為Win版本,支援程式碼提示!

SecLists
SecLists是最終安全測試人員的伙伴。它是一個包含各種類型清單的集合,這些清單在安全評估過程中經常使用,而且都在一個地方。 SecLists透過方便地提供安全測試人員可能需要的所有列表,幫助提高安全測試的效率和生產力。清單類型包括使用者名稱、密碼、URL、模糊測試有效載荷、敏感資料模式、Web shell等等。測試人員只需將此儲存庫拉到新的測試機上,他就可以存取所需的每種類型的清單。

Safe Exam Browser
Safe Exam Browser是一個安全的瀏覽器環境,安全地進行線上考試。該軟體將任何電腦變成一個安全的工作站。它控制對任何實用工具的訪問,並防止學生使用未經授權的資源。

Atom編輯器mac版下載
最受歡迎的的開源編輯器

記事本++7.3.1
好用且免費的程式碼編輯器