我已使用 phpdesktop 将基于 Laravel 的 Web 应用程序迁移到桌面应用程序。当我在本地运行时一切正常。当我尝试使用我的机器作为服务器在另一台机器上运行它时,问题就出现了。这是我进行更改的代码:-
"web_server": {
"listen_on": ["XXX.XXX.X.XXX", XXXXX],
"www_directory": "public",
"index_files": ["index.html", "index.php"],
"cgi_interpreter": "php/php-cgi.exe",
"cgi_extensions": ["php"],
"cgi_temp_dir": "",
"404_handler": "/pretty-urls.php",
"hide_files": []
}
在上面的代码中,我提到了我的机器IP地址和端口号(在listen_on中),但我无法在任何其他机器上运行它。
最佳答案
我已经通过在www目录中创建index.php文件并在其中编写一组特定的代码来解决这个问题
header('location:http://example.com/codeit/blackbolt/public/login')
关于php - 无法使用本地计算机作为服务器在客户端运行桌面应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47215913/