We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33992 ☆ A M B ☆
    • 455 Posts
    Hi,
    I wanna test a upload snippet but after upload, no file uploads and $_FILES is empty.
    see sample codes below:
    <?php
    print '
    	<form method="POST" enctype="multipart/form-data" action="[~[*id*]~]">
    		<input type="file"   name="upload" />
    		<input type="submit" value="upload" name="submit" />
    	</form>
    ';
    
    if(isset($_POST['submit'])){
    	if(empty($_FILES))
    		print '<b>empty</b>'.$_FILES["upload"]["error"];
    }
    ?>


    in these codes, always prints empty.
    even print_r($_FILES) prints Array( )
    can anyone help me?


    thanks
    AHHP
      God loves me. 【ツ】


      MODX.ir (Persian Support)

      Boplo.ir/modx/ (Persian)
      • 25830
      • 19 Posts
      Maybe try uncached snippet call.

      [!YourSnippet!]
        • 33992 ☆ A M B ☆
        • 455 Posts
        Thank you very much for your guide.
        and sorry for create topic without check settings, i found out that i had no permission to upload.
        I got it and work fine now.

        thank you again
          God loves me. 【ツ】


          MODX.ir (Persian Support)

          Boplo.ir/modx/ (Persian)