【发布时间】:2014-11-30 15:30:48
【问题描述】:
由于客户端问题,我必须将 laravel 4 应用程序放在共享托管服务上。但我在 [laravelio] 遵循了这个过程,其中包括。
Place the files of the laravel public folder i.e. css, img, js etc; into public_html folder (don't dump public folder instead dump the files and folders in it).
Put all the remaining folders & files into another folder, say 'laravelcore' and place the laravelcore folder in the root (/home5/username/)
Open index.php in the public_html folder and replace the following lines as mentioned
require DIR.'/../bootstrap/autoload.php';
require __DIR__.'/../laravelcore/bootstrap/autoload.php';
$app = require_once DIR.'/../bootstrap/start.php';
$app = require_once __DIR__.'/../laravelcore/bootstrap/start.php';
Open paths.php file in laravelcore/bootstrap and replace the following line
'public' => DIR.'/../public',
'public' => __DIR__.'/../../public_html',
这应该可以工作,但是当我访问 url 时,我得到了这个:在这个服务器上找不到请求的 URL /login。请问可能是什么问题,因为我没有得到它。可能是关于配置 .htacces文件。
如有任何帮助,将不胜感激。谢谢 网址是:benin1897.com
我刚刚发现 public_html 文件夹中没有 .htaccess 文件。这可能是问题...
这是我的文件树
(/home/benincom) 等等 日志 邮件 oysg 应用程序 引导程序 小贩 公共ftp public_html css js 错误日志 自述文件 包.json 机器人.txt 时间
现在我登录了,但是 LARAVEL 抛出了错误
/ / |------------------------- -------------------------------------- |注册自动装载机|--------------------------------------------- ------------------------------ | | Composer 提供了一个方便的、自动生成的类加载器|对于我们的应用程序。我们只需要利用它!我们需要它 |把脚本放到这里让大家不用担心了| “手动”加载我们的任何类。放松的感觉很棒。 | / 需要 DIR.'/../oysg/bootstrap/autoload.php'; / |-------------------------------------------------------- ------------------------------ |打开灯|--------------------------------- ------------------------------ | |我们需要照亮 PHP 开发,所以让我们开灯吧。 |这会引导框架并准备好使用,然后它 |将加载此应用程序,以便我们可以运行它并发送 |响应返回浏览器并取悦这些用户。 | / $app = require_once DIR.'/../oysg/bootstrap/start.php'; / |-------------------------------------------------------- ------------------------------ |运行应用程序|---------------------------------- ---------------------------------------- | |一旦我们有了应用程序,我们就可以简单地调用 run 方法,|它将执行请求并将响应发送回 |客户的浏览器让他们享受创意|以及我们为他们准备的精彩应用程序。 | */ $app->run();
【问题讨论】:
-
您能否以
treeview向我们展示您目前拥有的所有内容? (不是文档怎么说,而是你现在如何拥有它)。也许是编辑过的文件的转储(只是为了验证没有任何拼写错误) -
看起来你修好了? (如果我查看您的网站,我会看到一个不错的登录页面)