Read more
git checkout master
git pull origin master
git merge test
git push origin master
Displaying 51-60 of 276 results.
Здесь я подробно расскажу, как установить Yii - фрэймфорк под популярную сборку веб-сервера XAMPP в операционной системе Windows 8.
Для работы Yii - фрэймфорка, необходим PHP версии 5.1 и выше, a в ближайшем будущем появится новая версия фрэймворка в которой уже понадобится как минимум версия 5.3.
Для работы с проектами на локальном компьютере на данный момент я использую XAMPP 3.0.12 c версией php 5.4. Скачать XAMPP можно здесь.
Лично я настроил XAMMP так, что все проекты у меня хранятся на диске D в папке PHP, чего и вам советую.
Что касается самого yii-фрэймворка, скачть его можно здесь. Пример развертывания проекта у меня будет происходить на версии yii 1.1.4.
Создаем в папке php новую папку с проектом. Я назвал ее learn.loc. Далее, для нового проекта настраиваем виртуальные хосты и т.д.. В общем, все стандартные действия, чтобы после введения в строку браузера http://learn.loc ваш проект не послал вас на 404 или куда-то в подобном направлении.
Распакуем в корень папки learn.loc скачанный фрэймворк.
Теперь настало время консоли windows. Вывзываем консоль (надеюсь, как это сделать объяснять не надо) и вводим такое заклинание:
C:/xampp/php/php.exe C:/xampp/htdocs/learn.loc/framework/yiic webapp C:/xampp/htdocs/learn.loc/
Где C:/xampp/php/php.exe - путь до исполняемого файла php, C:/xampp/htdocs/learn.loc/framework/yiic - путь до файла во вреймворке, который развертывает проект, а C:/xampp/htdocs/learn.loc/ - путь куда мы хотим развернуть проект.
Далее, в консоли у нас спросят, внтатуре ли мы отвечем за базар. Вводим y (yes) и наслаждаемся бегущими строчками на черном экране. Типа вы архитектор матрицы.
На этом всё. Делее можете проверить, работает ли проект, введя в браузер http://learn.locRead more
Для работы Yii - фрэймфорка, необходим PHP версии 5.1 и выше, a в ближайшем будущем появится новая версия фрэймворка в которой уже понадобится как минимум версия 5.3.
Для работы с проектами на локальном компьютере на данный момент я использую XAMPP 3.0.12 c версией php 5.4. Скачать XAMPP можно здесь.
Лично я настроил XAMMP так, что все проекты у меня хранятся на диске D в папке PHP, чего и вам советую.
Что касается самого yii-фрэймворка, скачть его можно здесь. Пример развертывания проекта у меня будет происходить на версии yii 1.1.4.
Создаем в папке php новую папку с проектом. Я назвал ее learn.loc. Далее, для нового проекта настраиваем виртуальные хосты и т.д.. В общем, все стандартные действия, чтобы после введения в строку браузера http://learn.loc ваш проект не послал вас на 404 или куда-то в подобном направлении.
Распакуем в корень папки learn.loc скачанный фрэймворк.
Теперь настало время консоли windows. Вывзываем консоль (надеюсь, как это сделать объяснять не надо) и вводим такое заклинание:
C:/xampp/php/php.exe C:/xampp/htdocs/learn.loc/framework/yiic webapp C:/xampp/htdocs/learn.loc/
Где C:/xampp/php/php.exe - путь до исполняемого файла php, C:/xampp/htdocs/learn.loc/framework/yiic - путь до файла во вреймворке, который развертывает проект, а C:/xampp/htdocs/learn.loc/ - путь куда мы хотим развернуть проект.
Далее, в консоли у нас спросят, внтатуре ли мы отвечем за базар. Вводим y (yes) и наслаждаемся бегущими строчками на черном экране. Типа вы архитектор матрицы.
На этом всё. Делее можете проверить, работает ли проект, введя в браузер http://learn.locRead more
I am trying to install composer by that way and get some errors.
Instalation
Step 1: Ensure the Curl dependency is installed.
Step 2: Download the Composer installer and pass it to php.
My error in this step:
Instalation
Step 1: Ensure the Curl dependency is installed.
sudo apt-get -y install curl
Step 2: Download the Composer installer and pass it to php.
sudo curl -sS https://getcomposer.org/installer | php
My error in this step:
Read more
The program 'php' can be found in the following packages:
* php7.0-cli
* hhvm
Try: sudo apt install <selected package>
curl: (23) Failed writing body (0 != 16133)
I am trying to install skype to ubuntu and all methods which I use didn't resolve this error
In command line I have got error like this
I try to install gdebi installer, and have got error too
Error:
This software comes from a 3-rd party and may contain non-free components error
In command line I have got error like this
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
google-chrome-stable : Depends: libpango1.0-0 (>= 1.14.0) but it is not going to be installed
Depends: libappindicator1 but it is not going to be installed
ubuntu-restricted-extras : Depends: ubuntu-restricted-addons but it is not going to be installed
Recommends: ttf-mscorefonts-installer but it is not going to be installed
Recommends: unrar but it is not going to be installed
Recommends: libavcodec-extra
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
I try to install gdebi installer, and have got error too
sudo apt install gdebi
Error:
Read more
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
gdebi : Depends: gdebi-core (= 0.9.5.7ubuntu1) but it is not going to be installed
Depends: gksu but it is not going to be installed
Depends: gnome-icon-theme but it is not going to be installed
Recommends: libgtk2-perl but it is not going to be installed
google-chrome-stable : Depends: libpango1.0-0 (>= 1.14.0) but it is not going to be installed
Depends: libappindicator1 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
I use jsnow.js javascript plugin and now I have got this error.
Please help to resolve itRead more
$(document).ready(function () {
$().jSnow({zIndex : 999999999});
})
Please help to resolve itRead more
I have a function and onmousemove event in body attribute.
JS
HTML
It is working fine, But I want to event handler to my script file, and remove from bodyRead more
JS
function mouseShowHandler(e){
e = e || window.event
if (e.pageX == null && e.clientX != null ) {
var html = document.documentElement
var body = document.body
e.pageX = e.clientX + (html && html.scrollLeft || body && body.scrollLeft || 0) - (html.clientLeft || 0)
e.pageY = e.clientY + (html && html.scrollTop || body && body.scrollTop || 0) - (html.clientTop || 0)
}
xx=e.pageX
yy=e.pageY
}
HTML
...
<body onmousemove="mouseShowHandler(event)">
...
It is working fine, But I want to event handler to my script file, and remove from bodyRead more
I have DHtmlx form, and I have select option part of form. How I can downlload data from db and fill my select options
My form
I dont want load content from another file by select attribute, i want to upload int main file and output thereRead more
My form
var str = [
{ type:"block" , name:"bl1", list:[
]},
{ type:"input" , name:"id", label: "ID", hidden: true},
{ type:"input" , name:"status", label: "Status:", readonly: true, width: 287, labelWidth: 70, value: "Not set"},
{ type:"input" , name:"count", label: "Count"},
{ type:"select" , name:"worker", label: "Worker"},
{ type:"button" , name:"save", value:"End process", width:"320" }
];
form_1 = tab_x.attachForm(str);
I dont want load content from another file by select attribute, i want to upload int main file and output thereRead more
I have datetime from MySQL db in format Y:m:d H:i:s like
I want to check, if time from datetime equal "00:00:00", then return or echo only date.
Result
2014-11-02 02:04:05
2014-11-02 00:00:00
etc ...
I want to check, if time from datetime equal "00:00:00", then return or echo only date.
Result
Read more
2014-11-02 02:04:05
2014-11-02
In the Model class, I overrode the getTableSchema and manually defined the foreign keys like so:
And in the corresponding table:
Now the standard relation definitions work directly!
as well as
public function getTableSchema()
{
$table = parent::getTableSchema();
$table->columns['sid']->isForeignKey = true;
$table->foreignKeys['sid'] = array('Click', 'm_sid');
return $table;
}
And in the corresponding table:
public function getTableSchema()
{
$table = parent::getTableSchema();
$table->columns['m_sid']->isForeignKey = true;
$table->foreignKeys['m_sid'] = array('Message', 'sid');
return $table;
}
Now the standard relation definitions work directly!
'clicks'=>array( self::HAS_MANY, 'Click', 'm_sid' ),
as well as
Read more
'message'=>array( self::BELONGS_TO, 'Message', 'sid'),
I am trying to run my Yii 1 website and connect to DB, which is not in my hosting iPage.com and have this error:
For example, my MySQL config in iPage.com working fine
protected/config/database.php
Another server connection and error
protected/config/database.php
Error:
CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] Connection refused
For example, my MySQL config in iPage.com working fine
protected/config/database.php
<?php
return array(
'connectionString' => 'mysql:host=*******.ipagemysql.com;dbname=somename',
'emulatePrepare' => true,
'username' => 'someuser',
'password' => 'somepassword',
'charset' => 'utf8',
);
Another server connection and error
protected/config/database.php
<?php
return array(
'connectionString' => 'mysql:host=anotherhostname;dbname=somename',
'emulatePrepare' => true,
'username' => 'someuser',
'password' => 'somepassword',
'charset' => 'utf8',
);
Error:
Read more
CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] Connection refused