php+java开发支配环境配置2012-11-15
php+java开发部署环境配置2012-11-15
A、tomcat和apache互通
1、安装java、apache、tomcat、php(安装php时不需要安装里面的附带组件)
2、下载整理的配置文件conf.rar
3、conf.rar中uriworkermap.properties和workers.properties放到apache安装目录下的conf文件夹
4、mod_jk.so放到apache安装目录下的modules文件夹
5、httpd.conf覆盖自己apache安装目录下的conf文件夹里的httpd.conf,根据自己情况修改apache安装目录和工程配置目录
6、工程配置目录里放置测试jsp和php文件
7、重启tomcat和apache,如访问http://localhost/aaa.jsp或aaa.php看是否能直接访问
B、java-php-bridge配置
在tomcat和apache可以互通的情况下:
1\tomcat配置到web目录下,apache也配置到web目录下(工程目录根据自己的情况配置,只要tomcat和apache配置到同一目录即可)
2\将解压后的JavaBridge示例工程目录放到web目录下
3\双击运行lib下的JavaBridge.jar,选择8080端口
4\修改JavaBridge工程中java/Java.inc 文件,搜索8080替换成8081,此端口给桥使用(如果没有java文件夹,自建一个并下载java.inc)
5\启动tomcat和apache
6\访问http://localhost/JavaBridge/index.php
C、配置php+java开发环境:
1、tomcat工程目录为原生目录webapps,修改apache工程目录至tomcat的webapps目录
2、在eclipse中配置tomcat,然后部署工程至tomcat并启动tomcat,启动apache
附件包含conf.rar配置文件,java.inc配置文件(已将端口改为8001),java访问php的jar包。
JavaBridge示例工程太大,可直接官网下载
http://php-java-bridge.sourceforge.net/pjb/examples.php

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Running the H5 project requires the following steps: installing necessary tools such as web server, Node.js, development tools, etc. Build a development environment, create project folders, initialize projects, and write code. Start the development server and run the command using the command line. Preview the project in your browser and enter the development server URL. Publish projects, optimize code, deploy projects, and set up web server configuration.

In PHP, you can effectively prevent CSRF attacks by using unpredictable tokens. Specific methods include: 1. Generate and embed CSRF tokens in the form; 2. Verify the validity of the token when processing the request.

In PHP, the final keyword is used to prevent classes from being inherited and methods being overwritten. 1) When marking the class as final, the class cannot be inherited. 2) When marking the method as final, the method cannot be rewritten by the subclass. Using final keywords ensures the stability and security of your code.

Strict types in PHP are enabled by adding declare(strict_types=1); at the top of the file. 1) It forces type checking of function parameters and return values to prevent implicit type conversion. 2) Using strict types can improve the reliability and predictability of the code, reduce bugs, and improve maintainability and readability.

To set character encoding on the server side to solve the garbled Bootstrap Table, you need to follow the following steps: check the server character encoding; edit the server configuration file; set the character encoding to UTF-8; save and restart the server; verify the encoding.

The future of PHP will be achieved by adapting to new technology trends and introducing innovative features: 1) Adapting to cloud computing, containerization and microservice architectures, supporting Docker and Kubernetes; 2) introducing JIT compilers and enumeration types to improve performance and data processing efficiency; 3) Continuously optimize performance and promote best practices.

PHP and Python each have their own advantages, and the choice should be based on project requirements. 1.PHP is suitable for web development, with simple syntax and high execution efficiency. 2. Python is suitable for data science and machine learning, with concise syntax and rich libraries.

Search and replace using regular expressions in SublimeText can be achieved through the following steps: 1. Turn on the search and replace function, using the shortcut keys Ctrl H (Windows/Linux) or Cmd Opt F (Mac). 2. Check the "regular expression" option and enter the regular expression mode to search and replace. 3. Use the capture group to extract matching content, for example, use https?://(1) to extract the domain name in the URL. 4. Test and debug regular expressions to ensure that the required content is correctly matched. 5. Optimize regular expressions to avoid over-match and use non-greedy matching to improve performance. /↩
