在计算机之间移动 Laravel 项目 [英] moving Laravel project between computers
问题描述
我一直在电脑上做 laravel5 项目,但现在我想继续做另一个,但不知道如何:(
I have been working on a laravel5 project on a computer , but now I want to continue on an other, but don't know how :(
我正在使用 wampserver 并且项目位于www"文件夹中,这是我在尝试打开项目时遇到的错误:内部服务器错误
I'm using wampserver and the project is in the "www" folder, this is the error I'm getting when trying to open the project: " Internal Server Error
服务器遇到内部错误或配置错误,无法完成您的请求"
The server encountered an internal error or misconfiguration and was unable to complete your request"
推荐答案
你的错误信息很模糊,很难查明原因.我假设您只是复制粘贴了所有项目文件
Your error message is very vague, so it is hard to pinpoint the cause. I assume you just copy pasted all of the project files
尝试以下步骤:
- 确保复制所有项目文件,包括隐藏的文件 (.env).
- 按照 http://laravel.com/docs/ 准备目标计算机
- 检查您在 php.ini 中是否拥有所有必要的 PHP 扩展,如上述链接要求.另外,请注意您的 PHP 版本!
- 安装 composer https://getcomposer.org/doc/00-intro.md
- 复制后,转到目标文件夹并运行
composer install
. 从命令行运行 php artisan key:generate.
- Make sure you copy all of the project files including the hidden ones(.env).
- Prepare your destination computer as in http://laravel.com/docs/
- Check you have all the necessary PHP extensions available in php.ini as in above link requirements. Also, watch your PHP version!
- Install composer https://getcomposer.org/doc/00-intro.md
- When copied, go to your destination folder and run
composer install
. Run php artisan key:generate from the command line.
从命令行运行 php artisan cache:clear
Run php artisan cache:clear from command line
http://php.net/manual/en/install.windows.commandline.php
确保您的网络服务器正在为项目/公共文件夹中的页面提供服务.
Make sure your webserver is serving pages from project/public folder.
如果 laravel 失败,请检查日志文件以查看原因
If laravel is failing, check the log file to see the cause
your_project/storage/logs/laravel.log
这篇关于在计算机之间移动 Laravel 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!