Use the ABSPATH constant defined in the wp-config.php:
$filename = ABSPATH . 'wp-content/uploads/webcam/webcamimage.jpg';
You don’t have to use basename() function since it would return only the last component from the full file path, i.e. webcamimage.jpg, and it isn’t what you want to use with filemtime() function.
Related Posts:
- All shortcodes not working on custom theme
- Plugin Handle URL With Custom Theme
- Where are theme codes located for WordPress?
- using do_shortcode
- How to activate a plugin on the activation of a theme?
- Override/ignore CSS from active theme as not to interfere with my custom CSS
- Load CSS files in header of Bones theme?
- how to display a template.php in a shortcode
- do_shortcodes() isn’t working
- WP Customer Reviews call short code on another page [closed]
- How to customise the output of the WP image gallery shortcode from a plugin?
- How to check if a theme is active?
- Custom media upload content for inserting custom post shortcode
- how to get path to images in the uploads folder to be used in a plugin
- Checking if an attribute exists in a shortcode
- How can I have two different urls for the same page that load two different templates?
- How to enable edit button in the theme’s customize UI?
- Shortcode output appears before post body [duplicate]
- Ship plugin with a custom theme
- How to solve a conflict between a plugin and a theme?
- WP Config for FTP credentials
- How to call shortcode function directly and pass $atts
- WordPress error – PHP Fatal error: Uncaught Error: Call to undefined function register_block_type_from_metadata()
- Plugin form unable to process
- Workflow and best practice for documentation [closed]
- Frontend editing, Frontend user dashboard
- Can I share predefined fonts from theme_support with a gutenberg component?
- Can’t get custom posts of taxonomy to show
- How can I measure the performance of any WordPress Plugin or Theme?
- add_action in functions.php, do_action in plugin?
- Implement plugins as part of a theme
- Pass variable to nested shortcode
- Add custom variable in Contact Form 7 mail body
- get shortcode value
- Theme or Plugin: Where should I write my code?
- Storing Options in a Shortcode
- Is it possible to use WordPress as an online portfolio for text content? What kind of theme would I look for?
- Do I still need a theme to use page builders?
- Prevent shortcode from being wrapped in tags
- Can I make a super plugin that also has a theme?
- Prevent WordPress installing plugins and themes via Admin
- Check for security updates
- How to fix wrong attribute error for Visual Composer Grid Builder?
- Plugin-generated pages use Not Found or Pages Archive templates?
- Shortcode Plugin to dynamically build a shortcode via `do_shortcode` not working
- All sites themes functions.php have been changed
- Create shortcode to echo javascript
- Redirect to another page using contact form 7? [closed]
- Custom Shortcode Broken in WordPress 3.1
- Namespaced shortcode?
- How to check if my wordpress websiste is nulled or not?
- Remove specific plugins and themes from the Dashboard->Updates page [duplicate]
- Shortcode does not expand in Facebook like
- How to get theme’s info from wordpress.org/themes using api.wordpress.org?
- How to find the list of custom post type where logged in user is author
- why need theme,if page builder is there in wordpress [closed]
- speed up pagination for huge database
- How to rewrite URL and get the values?
- Is there a good way to load tiny_mce_popup.js through editor.windowManager.open?
- How to prevent tabs from opening all at once
- Executing Javascript in Plugin
- Is it possible for a plugin to prevent certain plugins from being installed?
- How do you create a re-useable HTML fragment in wordpress
- Identify current wordpress theme
- How To Use do_shortcode with WooCommerce One Page Checkout
- Can’t load the the canges of field groups [duplicate]
- How to get current cart values using WC_Shortcodes?
- Javascript console errors and WSOD on edit post pages
- Can I add Short Code Of A Plugin In The Code Editor of WordPress?
- insert og image link in wordpress post
- How to check if short code is present in template?
- How Can I Create A Form In WordPress For Subscribers To Alert Them about new Listing posted?
- Why is my shortcode not working?
- What plugin would make this happen? If is the theme
- WordPress site hamburger menu toggle not working
- using WPPB shortcodes without the plugin
- WordPress wp get_temp_dir return non exiting folder, thus failing plugin & themes update
- when i activate my WordPress plugin cannot see customizer options or preview
- Writing SEO for Homepage when homepage is set to display latest posts
- save short-code in my custom plugin settings problem missed something
- Getting unknown text in footer of email
- Description: Too much time has passed without sending any data for document
- How can I make the search bar in my wordpress site search all of the pages rather than just the blog posts?
- Meta box or shortcode help
- Call/Run a Mathematica (.m) Shell Script from WordPress Page/Blog
- Issues with Post 2 Post Plugin
- Need to change contact email depending where user is from
- Disqus plugin outputs script as literal text
- Pulling RSS from site and display it in posts
- How to get current template file used by WordPress?
- Shortcode return is printing a 1 afterward
- Terms id wordpress error
- How to make wordpress backend mobile optimized.?
- Display HTML5 jQuery Audio Player On Front Page
- Invalid argument supplied for foreach()
- What is phpBB? Is it something like a plugin which I can use in WordPress? [closed]
- Very slow page loads
- How can I get the permalink of a page on which shortcode has been used
- How to create new title and its description inside a section in WP Customizer?
- Custom page template from plugin does not work with pre-installed themes in WordPress 6.6.1