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:
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.