Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Posts posted by trq

  1. Anyone actually use this technique?

    I wouldn't. I much prefer to go the template route. A *very* simple example:

     

    <?php
    
    function renderTemplate($template, array $data = [])
    {
      extract($data);
      include $template;
    }
    
    template.html.php

    <table width="100%" cellpadding="12" cellspacing="0" border="0">
      <tr bgcolor ="black">
        <td align ="left"><img src = "logo.gif" /></td>
        <td>
          <h1><?= $heading; ?></h1>
        </td>
        <td align ="right"><img src = "logo.gif" /></td>
      </tr>
    </table>
    
    <?php
    
    renderTemplate('template.html.php', ['heading' => 'TLA Consulting Pty Ltd']);
    
  2. I know that Rackspace do "Managed Operations" but at this point it is far too expensive.

    That is indeed what your looking for. It's not cheap, no.

     

    If you can find a freelance devops guy you could go down that route (hint hint). We have a freelance board, but I'm not sure where else you might search or how much activity you might get.

  3. Should it look like this?

    <p class="submit">
          <input type="submit" formaction="form-to-email.php" name="submit" id="submit" value="Send message">
        </p> 
    

     

    No, the code you're have in your form is fine. Judging from your error, you don't have a server setup. PHP requires a http server configured to execute PHP. You then need to access your site via urls, not file paths. eg; http://localhost/index.html, not file:///C:/ etc

  4. This obviously wont work because it overrides the joomla autoloading function

    It shouldn't. spl_autoload_register adds autoloaders onto a stack of autoloaders. So, unless Joomla is doing something funky with its autoloading, your implementation looks fine.

     

    Another option to consider would be to simply use Composer. All you need to do then is include composer's autoloader into your project somewhere.

×
×
  • Create New...

Important Information

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.