Žyma: programavimas

  • Running migrations for Codeigniter 4 via HTTP

    Running migrations for Codeigniter 4 via HTTP

    I did not have command line access on a few of the servers that hosted the projects I was working on. And currently Codeigniter 4 only has documentation on running database migrations / rollbacks / seeds in the command line. Therefore I asked around and made a special controller for the migrations / rollbacks /…

  • PHP function to check if a date is a holiday in Lithuania

    PHP function to check if a date is a holiday in Lithuania

    Here is a simple function for PHP to check if a date, given in standard ISO format (Y-m-d) is a public holiday in Lithuania. I needed one for a project, so here it is for everyone:

  • Codeigniter form with integrated data and file validation

    Codeigniter form with integrated data and file validation

    In one application built on Codeigniter framework I needed to create a special form. The form had to allow a user to both enter text data and upload an image. It was actually the first time I had any experience with programming forms that would include file upload. And I found out it is not…

  • Pažiūrėkime, kokia nauda iš to optimizavimo paieškos varikliams (SEO)

    Kažkada prieš gerą dešimtmetį, kai dar kūriau tinklaraštį, pamėginau įjungti gražių, Google ir kitiems paieškos varikliams pritaikytų puslapių adresų parinktį. Na, kad vietoje šifro https://dg.lapas.info/?p=580 rodytų gražų ir prasmingą adresą: https://dg.lapas.info/irasas/vanagai-is-anapus/ Anuomet man kažkas nesigavo – gal serverio nustatymai buvo neteisingi. Teko tuos gražius adresus išjungti. Pamatęs, kad Google ganėtinai neblogai indeksuoja mano neoptimizuotą svetainę,…

  • Senos MySQL duomenų bazės koduotės sutvarkymas

    Kas kada nors bandė tvarkyti MySQL duomenų bazių koduočių problemas, tas žino, kad tai dažnai nėra paprastas reikalas. Savo koduotes turi duomenų bazės, lentelės ir net lentelių stulpeliai, ir šios koduotės gali būti skirtingos vienoje ir toje pačioje duomenų bazėje. O kadangi MySQL dar prieš gerą dešimtmetį duomenis standartiškai įrašydavo Latin1 koduote, senesnėse žiniatinklio programose…