开发者

Address of yii applications

I a new in Ubuntu and PHP frameworks. I had read the book about Yii name "Agile web application development with yii and php 5".

And this is the part of text:

Yii comes with a simple requirement checking tool. To invoke
the tool and have it verify t开发者_运维百科he requirements for your installation, simply point
your browser to:
http://yourhostname/path/to/yii/requirements/index.php

I installed yii in /var/www/html/yii directory.

When I trying to open http://localhost/var/www/html/yii/requirements/index.php I get error message: Oops! This link appears to be broken.

Thanks for any help!


It depends on what your Apache server's "webroot" (localhost) is.

If your webroot is /var/www/html then el chief's answer would work:

http://localhost/yii/requirements/index.php

But your webroot is /var/www then you need to include the html part too:

http://localhost/html/yii/requirements/index.php

Basically "localhost" = /some/path (your Apache webroot), and when you are writing your URL you can just substitute the two.

So if "localhost" = /var/www instead of writing http://var/www/index.php you just write http://localhost/index.php

I hope this helps you with a higher-level understanding of what is going on.


This might help somebody, even though the question is already answered, since I had come searching here, even though the underlying issue was different.

I made the dumb mistake of extracting the downloaded yii archive into the www directory and accessing it via the http://localhost/yii/ URL, but took a while to realise that the extracted directory has the build#-release#, and once renamed to just "yii", things worked. Like I said, the problem you faced was different, but symptom was somewhat similar.


it should be http://localhost/yii/requirements/index.php


Also be aware that this book, while helpful, seems to have been rushed to publication. There's many fixes to be found on the Yii forums. I suggest you keep a tab open whenever you come across something that doesn't work or doesn't seem "right" in the book.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜