Greetings There was a problem. Here is the code for the variable:

$put = 'D:\test123\text\txt\1.txt'; file($put);` 

The problem is that the file reads \ (I think so but not sure) as a special character, how to fix it?

  • one
    First of all, I recommend copying the text of the error here or describing in more detail what exactly does not work. and it would be absolutely good to get more code in two lines. You don’t understand what it is - Broouzer King
  • Your problem is not particularly clear, the use of the function is correct and the variable is correct, describe the problem in more detail. - Firepro
  • The problem is that if $ put = 'D: \ test123 \ text \ txt \ 1.txt'; Then an error occurs in the file ($ put); But let it be $ put = 'D: /test123/text/txt/1.txt'; That's all fine. How do I make the 1st path work? - Bogdan
  • Since strangers (not specialists in PCP) do not have your project, then put \\ instead of \ all. - nick_n_a

0