Answer the question
In order to leave comments, you need to log in
Does PHP have a function to open a file on a PC?
Purely, for the sake of interest, is there such a function that opens the file specified on the PC in the window?
I know that you can open it through the command line: $path = ` Путь к файлу `;
but I didn’t find such a function)
Is there such a thing in nature?
Answer the question
In order to leave comments, you need to log in
Are you aware that php is a server language and does not interact with the GUI + `something` - do not open a file?
Read on fopen + file_get_contents
exec(mspaint);
This is how it worked for me, that is, accessing a page with such code via the web opened a paint window on the server. If you also need the axis to determine how to open the file, then I think you can also dig and find it.
return header('Content-Type: '<формат файла>');
example
file formats need to be googled, but it works something like this
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question