PHP does not create file

0

Good morning, Hi, I have a json script that has a php script that can be used to create a json file. I have a json script that uses a json script. saved to a folder on the server. These days I realized that when json exceeds 80 lines php does nothing. my server here and windows server. I did a test in two free hosting with the same script and it worked cool if problems. Is it some configuration on the server?

<?php
 if(isset($_POST["site"])) {
 $jsonObj = json_decode($_POST["site"]); 
 $json    = json_encode($jsonObj);
 $json = str_replace("},{","},\r\n{",$json);//quebrando em linhas

 $json = str_replace("\u00e3","a",$json);//alterando ã para a 
 $json = str_replace("\u00e1","a",$json);//alterando á para a
 $json = str_replace("\u00f5","o",$json);//alterando õ para o 
 $json = str_replace("\u00f3","o",$json);//alterando ó para o
 $json = str_replace("\u00e7","c",$json);//alterando ç para c
 $json = str_replace("\u00ea","e",$json);//alterando ê para e
 $json = str_replace("\u00f4","o",$json);//alterando ô para o

 $nomeArquivo  = date("d-m-y_H-i-s").".txt";     
 $file = fopen($nomeArquivo,'w');
 fwrite($file,$json);//granvando as linhas do arquivo
 echo 'Arquivo gerado com sucesso';
 }
 ?>
    
asked by anonymous 26.09.2016 / 15:00

0 answers