Skip to content
Advertisement

Tag: localhost

Delete image file from directory in PHP on remote server and localhost

I’m trying to figure out, how to delete correctly image file with summernote from directory folder on remote server and localhost. So, image successfully uploaded from summernote editor and located by directory path: and C:xampphtdocsuserblogadmineditor-delete.php code: or Warning: unlink(): http does not allow unlinking in C:xampphtdocsuserblogadmineditor-delete.php Localhost correct path must be C:/xampp/htdocs/blog/uploads/img-uploads/154_20220702.png, but with unlink($_SERVER[‘DOCUMENT_ROOT’] .’/’. $file_name); the path contains

live reload not working for php files in vs code

I’ve installed the live server extension on VS code and on google chrome, and configure them to enable live reload but live reload is not working. It was working a few hours ago but now I can’t get it to work. My server I’m using live server: Things I’ve tried: deleting and reinstalling both live servers quitting VS code made

How to allow CORS in Yii2?

I have a JavaScript frontend that ask for a plain text to my PHP backend. It almost works excepts because I have a CORS problem. How can allow CORS in my PHP code? My frontend (JavaScript and jQuery): My backend (PHP and Yii2): Answer Yii2 supports CORS handling, as written on the official documentation. Alternatively, you could try adding the

XAMPP server 404 Page Not Found

I am trying to reuse a php file for aa assignment. So the following line in index.php gives me the error message: 404 Page Not Found The page you are looking for could not be found. Check the address bar to ensure your URL is spelled correctly. If all else fails, you can visit our homepage at the link below.

Advertisement