The fact is that I have recently more or less learned how to write modules and components for joomla and now I want to write a simple script that will be a small form with a dozen fields where you could enter the component name, its version, author, parameters, click the " create "and the script itself created a" blank "for the component, i.e. 2 folders admin and site, file Name.xml files controller.php, entry point Name Name.php, etc. Thank you in advance!

  • You can ... The main thing is to follow the sequence! - Palmervan
  • And more specifically? Well, there are some functions or something else? =) Thank you! - maler1988

3 answers 3

<?php $code = ' <?php // Код PHP файла '; file_put_contents('/Путь_к_файлу/Имя_файла.php', $code); 

You must have write access to the folder in which you want to create files.

    Sure you may. Treat the file with the script code as a simple text file.

     fopen('new.php','w+') 
    • This and that works! Thank! F of file_put_content function, typo, at the end is missed s Thanks again to all! How to write a script - I will share in this post. - maler1988

    More precisely, how to binary.