简体   繁体   中英

local PHP & local node.js (react-native)

I have a local Apache server using XAMPP which runs on port 80 and uses a local PHP file.

In the browser I can open this file from localhost/test/test.php and localhost:80/test/test.php .

I also have a react-native app, and it starts an NPM server on port 8081.

In this app I want to make a request to the local PHP file, but when I make the request it returns a 404 error. I understand that it happens because the NPM server doesn't know about the local Apache server so I want to understand how to combine them.

Thanks.

不要写'localhost / test / test.php'你必须用你的ip写,就像这样=>'192.16xxx / test.php /'

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