开发者

Trouble Creating First Yii Application

开发者 https://www.devze.com 2023-03-23 02:15 出处:网络
Here is where I\'m at. I am running MAMP on my Mac, and I have Yii in my htdocs folder. I don\'t understand the yiic.php part of it. I got it working once after numerous tries, but I the folder struct

Here is where I'm at. I am running MAMP on my Mac, and I have Yii in my htdocs folder. I don't understand the yiic.php part of it. I got it working once after numerous tries, but I the folder structure wasn't how I wanted it. So, with my folder structure being:

  • yii
    • framework>
    • requirements>

Where exactly would I navigate to in the Terminal, and what would I type. I've been navigating into to Applications/MAMP/htdocs/Yii and then once in there running this command:

php framework/yiic.php webapp testdrive

After that I get the Yes/No question, run "Yes", it does its thing, and I get this folder structure:

  • yii>
    • framework>
    • requirements>
    • testdrive>
Then I navigate in my browser to: http://localhost:8888/yii/testdrive/ and I get nothing...any idea what I am doing wrong?

Any help will be much appreciated! :) Thanks!


This is a long shot, but make the Y in yii a capital letter. This is assuming that the directory Yii does indeed have a capital Y in it. Unix/Linux machines have case sensitivity when it comes to these sorts of things.

As for your directory structure, you can have the Yii framework files live outside of your web folder if you want to. The "testdrive" directory is all you need inside of the htdocs folder. That said, the framework files can live in the folder as well, but it's generally considered insecure.


I got the same problem, but I am sure that I did not delete any file there. Fortunately, I try to restart apache server, and I revisite my test website, and it is working.

I use MAMP on Mac Lion. Hope this information would be helpful.

0

精彩评论

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