How Can I Upload My File Into Ftp Server?

Hi,

i am new in yii framework.i have completed my project in localhost.how can i upload my file in ftp server in public_html folder.Is there need any changes in the file.here is the code about my index.php file:

<?php

// change the following paths if necessary

$yii=dirname(FILE).’/../yii/framework.1.1.12/yii.php’;

$config=dirname(FILE).’/protected/config/main.php’;

// remove the following lines when in production mode

defined(‘YII_DEBUG’) or define(‘YII_DEBUG’,true);

// specify how many levels of call stack should be shown in each log message

defined(‘YII_TRACE_LEVEL’) or define(‘YII_TRACE_LEVEL’,3);

require_once($yii);

Yii::createWebApplication($config)->run();

Please help me.

THANKS

I would suggest going through the Yii help: http://www.yiiframework.com/doc/guide/

You would need to upload the index.php, protected directory and /yii/framework.1.1.12 directory.

A good added security measure is to store your protected directory outside your public_html directory.

Only the index.php, css, js and images are required to be in the public_html directory. You just need to change the line:


$config=dirname(__FILE__).'/protected/config/main.php';

to somethnig like

$config=dirname(__FILE__).'/../yii/protected/config/main.php';

If it is in production mode, then the comments in the index.php file should be reviewed and debugging commented out, this will prevent error messages showing up and will speed up your application.

In general when transferring through FTP, I would suggest zipping everything in 1 file, transfer it on, go in via SSH to unzip it and make sure your index.php, css, js and images have CHMOD 755 permissions to prevent issues.

try to use this extension it may help you,i tried it works fine

http://www.yiiframework.com/extension/ftp

You can copy your framework into sub directory of your project. For examples:

  • Your Project Directory

|— yiiframework

And edit config/main.php like this:




$yii=dirname(__FILE__).'/yii/framework.1.1.12/yii.php';

$config=dirname(__FILE__).'/protected/config/main.php';



And don’t forget to remove this line or change to false value for security reason:




defined('YII_DEBUG') or define('YII_DEBUG',false);