1. Go to this page and download the library: Download yii-diandi/yii2-swoole library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?phprequire_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
yii-diandi / yii2-swoole example snippets
/**
* @Author: Wang Chunsheng 2192138785@qq.com
* @Date: 2020-03-12 20:12:31
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2021-04-09 18:25:50
*/return [
'components' => [
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=netos',
'username' => 'root',
'password' => 'root',
'charset' => 'utf8',
'attributes' => [
PDO::ATTR_STRINGIFY_FETCHES => false,
PDO::ATTR_EMULATE_PREPARES => false,
],
],
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@common/mail',
// send all mails to a file by default. You have to set// 'useFileTransport' to false and configure a transport// for the mailer to send real emails.'useFileTransport' => true,
],
],
'language' => 'zh-CN',
];
make distclean
phpize && \
./configure --with-php-config=/www/server/php/74/bin/php-config \
--enable-openssl \
--with-openssl-dir \
--enable-swoole-curl \
--enable-http2 && \
make && sudo make install
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.