How to remove file from a diffrent directory with PHP?

Tim

I have a PHP file with unlink() in application/views/delete/target.php and I want to delete a file in application/views/uploads/target.jpg. When I call target.php I want to remove both target.php and target.jpg but so far I was only able to remove the target in the delete/ folder.

<?php function destruct()
            { 
                unlink('../views/uploads/target.jpg');
                unlink('target.php');
            }
            destruct(); ?>
Tim
<?php function destruct()
            { 
                unlink('../uploads/4d.jpg');
                unlink('4d.php');
            }
            destruct(); ?>

I just needed to go down by one folder and enter next one.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Import func from file in diffrent directory kotlin

How to remove single file from /usr directory?

How to remove two lowest file (by their name) from directory

Htaccess how to remove trailing slash from file but not directory

How to remove `_` from all file-names in a directory

How to remove files from a directory if their names are not in a text file? Bash script

How to remove a directory from root?

How to copy a file from one directory to another using PHP?

How to run a php file with wamp from outside of the www directory?

how to access file from outside root directory in php

How to download a file from specific directory using php header

How do call a random .php file from another directory

Cannot remove file from working directory

SQL how to get values from diffrent tables?

How to get an item in an arraylist from a diffrent class

How to reach diffrent Subdomains on Guest from the host?

Remove directory from server that contains backslashes (PHP)

How to remove depcecated error's from PHP file

How to remove specific lines from a csv file in php?

How to remove all merged cells from an Excel file in php?

How to remove square brackets from string in php file?

how to remove a string having special characters from a file using php

How can I remove a file or directory called "\"?

How do i remove the dots in a php directory

How to remove same combination (same number but diffrent order) on list?

How to remove the same pair with diffrent order in values inside dictionary python?

PHP require a file from another directory: No such file or directory

How to remove virtualbox from brew when getting a "No such file or directory" error message

How can I replace a string in all filenames in a directory? (specifically I need to remove "\#015" from all file names in a directory