$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>Cant play videos|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Cant play videos

matteradmin9PV0评论

I have a movies folder called movies located in site root/wp-content/movies/. I also have a template creates in my theme called page-movies.php. And a wordpress page called movies using the page-movies.php template.

What is the correct way to display the list of movie urls in the movies folder on the movies page.

I've used a scandir() inside of A tags to display all the urls as "site/movies/movietitle.mp4" but I click thr link to the movie is loads nothing just a blank white page.

Is there a correct way I should be loading the list of movie urls onto a oage from a directory?

I have a movies folder called movies located in site root/wp-content/movies/. I also have a template creates in my theme called page-movies.php. And a wordpress page called movies using the page-movies.php template.

What is the correct way to display the list of movie urls in the movies folder on the movies page.

I've used a scandir() inside of A tags to display all the urls as "site/movies/movietitle.mp4" but I click thr link to the movie is loads nothing just a blank white page.

Is there a correct way I should be loading the list of movie urls onto a oage from a directory?

Share Improve this question edited Jan 30, 2019 at 7:42 fuxia 107k39 gold badges255 silver badges461 bronze badges asked Jan 30, 2019 at 2:53 JeremyJeremy 31 bronze badge 1
  • Problem solved, used full url with http in the beginning to fix the issue. – Jeremy Commented Jan 30, 2019 at 20:36
Add a comment  | 

1 Answer 1

Reset to default 0

If you movies are stored in /wp-content/movies/ and the URLs are site/movies/movietitle.mp4 then the links are pointing to the wrong place.

Change the URL's to include the wp-content path eg site/wp-content/movies/movietitle.mp4

Separate to your question, you could look at having your page-movies.php template load the links into a video element using javascript.

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far