<?php
namespace Tests\Feature;
use App\Services\ContentService;
use GuzzleHttp\Client;
use Tests\TestCase;
class ContentServiceTest extends TestCase
{
public function testsqrt(): void
{
$config = [];
$client = new GuzzleHttp\Client($config);
$o = new ContentService($client);
$this->assertEquals(4, $o->sqrt(16));
}
}
// vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php
/**
* Create a directory.
*
* @param string $path
* @return bool
*/
public function makeDirectory($path)
{
return $this->driver->createDir($path);
}
// vendor/league/flysystem/src/Adapter/Ftp.php:332
/**
* @inheritdoc
*/
public function createDir($dirname, Config $config)
{
$connection = $this->getConnection();
$directories = explode('/', $dirname);
foreach ($directories as $directory) {
if (false === $this->createActualDirectory($directory, $connection)) {
$this->setConnectionRoot();
return false;
}
ftp_chdir($connection, $directory);
}
$this->setConnectionRoot();
return ['type' => 'dir', 'path' => $dirname];
}
// vendor/league/flysystem/src/Adapter/Local.php:34
/**
* @var array
*/
protected static $permissions = [
'file' => [
'public' => 0644,
'private' => 0600,
],
'dir' => [
'public' => 0755,
'private' => 0700,
],
];
// vendor/league/flysystem/src/Adapter/Local.php:368
/**
* @inheritdoc
*/
public function createDir($dirname, Config $config)
{
$location = $this->applyPathPrefix($dirname);
$umask = umask(0);
$visibility = $config->get('visibility', 'public');
if ( ! is_dir($location) && ! mkdir($location, $this->permissionMap['dir'][$visibility], true)) {
$return = false;
} else {
$return = ['path' => $dirname, 'type' => 'dir'];
}
umask($umask);
return $return;
}
Сделайте так :
$(document).on('click', '.find-category__item', function() {
var to_close = $(this).next('.find-category__dropdown');
to_close.toggleClass('hidden');
}
$(document).mouseup(function (e){
$(document).find('.find-category__dropdown').addClass('hidden');
});
<?php
var_dump(isset($_SESSION['data']) && is_array($_SESSION['data']) && isset($_SESSION['data']['needKey'])) ? $_SESSION['data']['needKey'] : 'No data');
?>
<?php
var_dump(isset($_SESSION['data']) ? $_SESSION['data'] : 'No data');
?>
| id | name |
/*
тут храняться как страницы, те от которых зависит показ какой то страницы,
так и зависимые страницы. name это /module/controller/action
*/
| id | pageId | dependentPageId |
| id | userId | dependentPageId | isVisited |
<?php
class AUser extends CActiveRecord
{
public $id, $login, $hash, $email;
public $tel_1, $tel_2, $tel_3, $country_id;
public static function model($className=__CLASS__)
{
return parent::model($className);
}
public function tableName(){
// Название таблицы с данными пользователей в БД
return 'user';
}
}
$data=AUser::model()->findByPk($userId);
$this->render('myTmplte', array('userData' => $data));
<body>
<div>
Привет, <?=$userData['name']?>!
</div>
</body>
<?php
if(Yii::app()->user->isGuest){
//Вывод необходимого содержимого для неавторизированного пользователя ;
echo 'Вывод формы';
}else{
echo 'Вы авторизированный пользователь';
}
?>
upload_max_filesize = 20M
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
; Whether to allow HTTP file uploads.
; http://php.net/file-uploads
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
; http://php.net/upload-tmp-dir
upload_tmp_dir = /tmp
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 20M