我可以使用下面的代码创建子文件夹,但我只是无法返回id.
我想获取文件夹的id和/或链接,以便我可以将它们添加到我的数据库中.
目前,下面创建了文件夹,但只返回"//"作为id!
谢谢你的帮助
<?php
if ($client->getAccessToken()) {
$file = new Google_DriveFile();
//Setup the Folder to Create
$file->setTitle('Project Folder');
$file->setDescription('A Project Folder');
$file->setMimeType('application/vnd.google-apps.folder');
//Set the ProjectsFolder Parent
$parent = new Google_ParentReference();
$parent->setId('0B9mYBlahBlahBlah');
$file->setParents(array($parent));
//create the ProjectFolder in the Parent
$createdFile = $service->files->insert($file, array(
'mimeType' => 'application/vnd.google-apps.folder',
));
// print_r($createdFile);
print "folder created sucessfully";
echo "folder id is" . $createdFile->id;
}
?>
Run Code Online (Sandbox Code Playgroud) 我已成功更改了顶栏以了解我的需求.但是当折叠时,移动菜单没有显示相同的颜色(我想使用白色bg和简单的悬停,但bg是深灰色(应该是白色),而悬停是白色的,这是正确的)我看不出去哪里改变它们!
这是我到目前为止所拥有的:
HTML
<div class="nav-contain">
<div class="contain-to-grid">
<nav class="top-bar" data-topbar>
<ul class="title-area">
<li class="name"><h1><a href="/">SITE TITLE</a></h1></li>
<li class="toggle-topbar menu-icon"><a href="#"></a></li>
</ul>
<section class="top-bar-section">
<ul class="left">
<ul>
<?php foreach($pages->visible() AS $p): ?>
<li><a<?php echo ($p->isOpen()) ? ' class="active"' : '' ?> href="<?php echo $p->url() ?>"><?php echo html($p->title()) ?></a></li>
<?php endforeach ?>
</ul>
</ul>
</section>
</nav>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
SCSS
//Background color for the top bar
$topbar-bg-color: #fff;
$topbar-bg: $topbar-bg-color;
//Height and margin
$topbar-height: 45px;
$topbar-margin-bottom: 50px;
$topbar-title-weight: 300;
$topbar-title-font-size: rem-calc(17);
//Set the …Run Code Online (Sandbox Code Playgroud)