我有这个SVG:
* {
background: #e1e1e1;
}Run Code Online (Sandbox Code Playgroud)
<svg class="decor" height="100%" preserveaspectratio="none" version="1.1" viewbox="0 0 100 100" width="100%" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0 L100 100 L0 100" stroke-width="0"></path>
</svg>Run Code Online (Sandbox Code Playgroud)
如何旋转180度?!
我发现这个类使用php和MySQL进行线程评论:
<?php
class Threaded_comments
{
public $parents = array();
public $children = array();
/**
* @param array $comments
*/
function __construct($comments)
{
foreach ($comments as $comment)
{
if ($comment['parent_id'] === NULL)
{
$this->parents[$comment['id']][] = $comment;
}
else
{
$this->children[$comment['parent_id']][] = $comment;
}
}
}
/**
* @param array $comment
* @param int $depth
*/
private function format_comment($comment, $depth)
{
for ($depth; $depth > 0; $depth--)
{
echo "\t";
}
echo $comment['text'];
echo "\n";
}
/**
* @param array $comment
* …Run Code Online (Sandbox Code Playgroud) 我有这个网址:
http://localhost/cms/uploads/files/1/images/hd-wallpaper-40.jpg
Run Code Online (Sandbox Code Playgroud)
并需要转换为:(在1之前删除所有网址)
1/images/hd-wallpaper-40.jpg
Run Code Online (Sandbox Code Playgroud)
编辑:
http://localhost/cms/uploads/files/ 是动态所以也许: http://localhost/uploads/files/
怎么能用php转换这个url?