Jump to content

Problema com \ na função file_put_contents


Recommended Posts

Posted

Olá a todos, boa noite,

Estou a usar as funções file_get_contents() para pegar no conteudo de um arquivo e estou a usar a função file_put_contents para gravar nesse ficheiro

Até ai tudo bem

O problema é que se no meu ficheiro estiver "." ao ler o arquivo com file_get_contents tudo nromal.

Mas quando gravo o arquivo com file_put_contents aparece o seguinte:

\".\"

Eu não quero que aparecem essas barras

Estou a usar o código seguinte :

file_put_contents($ficheiro, $conteudo);

Como posso gravar o arquivo tal como ele aparece com file_get_contents sem as barras \

Como faço isso ?

Obrigado

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.