Ran*_*jit 6 php wordpress html5
我必须从下面的代码中获取图像源.
$thumburl = get_the_post_thumbnail($post->ID);
Run Code Online (Sandbox Code Playgroud)
我在这里
<img width="325" height="202" src="http://localhost/TantraProjects/Border-fall/Repo/WebApp/wp-content/uploads/2012/12/film.png" class="attachment-post-thumbnail wp-post-image" alt="film" title="film">
Run Code Online (Sandbox Code Playgroud)
我想得到这个部分.
"http://localhost/TantraProjects/Border-fall/Repo/WebApp/wp-content/uploads/2012/12/film.png"
Run Code Online (Sandbox Code Playgroud)
我怎样才能得到消息来源?
Mus*_*aie 25
$post_thumbnail_id = get_post_thumbnail_id($post->ID);
$post_thumbnail_url = wp_get_attachment_url( $post_thumbnail_id );
Run Code Online (Sandbox Code Playgroud)