<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[CodeIgniter Forums - All Forums]]></title>
		<link>https://forum.codeigniter.com/</link>
		<description><![CDATA[CodeIgniter Forums - https://forum.codeigniter.com]]></description>
		<pubDate>Thu, 10 Sep 2020 20:11:39 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Third Party seeds?]]></title>
			<link>https://forum.codeigniter.com/thread-77513.html</link>
			<pubDate>Thu, 10 Sep 2020 11:53:59 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=7907">blaasvaer</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/thread-77513.html</guid>
			<description><![CDATA[How would I create and run a seed from a Third Party module?<br />
<br />
I can seem to only run seeds from App\Database\Seeds ... can I 'somehow' point:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>php spark db:seed DefaultUser -path &#92;App&#92;ThirdParty&#92;Auth</code></div></div><br />
Would be nice ...]]></description>
			<content:encoded><![CDATA[How would I create and run a seed from a Third Party module?<br />
<br />
I can seem to only run seeds from App\Database\Seeds ... can I 'somehow' point:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>php spark db:seed DefaultUser -path &#92;App&#92;ThirdParty&#92;Auth</code></div></div><br />
Would be nice ...]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[how to deal with .com in SQL query?]]></title>
			<link>https://forum.codeigniter.com/thread-77512.html</link>
			<pubDate>Thu, 10 Sep 2020 11:15:38 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=14246">richb201</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/thread-77512.html</guid>
			<description><![CDATA[<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size"><span style="color: #660000;" class="mycode_color">I am building this string to use in a query. </span></span></span><br />
<br />
<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size"><span style="color: #660000;" class="mycode_color">&#36;where</span>=  <span style="color: #660000;" class="mycode_color">&#36;where</span>=<span style="color: #067d17;" class="mycode_color">"email="</span>.<span style="color: #660000;" class="mycode_color">&#36;this</span>-&gt;<span style="color: #871094;" class="mycode_color">session</span>-&gt;<span style="color: #00627a;" class="mycode_color">userdata</span>(<span style="color: #067d17;" class="mycode_color">'userid'</span>).<span style="color: #067d17;" class="mycode_color">" AND campaign="</span>.<span style="color: #660000;" class="mycode_color">&#36;this</span>-&gt;<span style="color: #871094;" class="mycode_color">session</span>-&gt;<span style="color: #00627a;" class="mycode_color">userdata</span>(<span style="color: #067d17;" class="mycode_color">'campaign'</span>);</span></span><br />
<br />
<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size">In my example this correctly becomes:</span></span><br />
<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size">"email=richb201@gmail.com AND campaign=Apple"</span></span><br />
<br />
<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size">But when I try running the following line</span></span><br />
<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size"><span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size"><span style="color: #660000;" class="mycode_color">&#36;crud</span>-&gt;<span style="color: #00627a;" class="mycode_color">set_relation</span>(<span style="color: #067d17;" class="mycode_color">'bus_comp'</span>,<span style="color: #067d17;" class="mycode_color">'business_components'</span>,<span style="color: #067d17;" class="mycode_color">'bus_comp'</span>,<span style="color: #660000;" class="mycode_color">&#36;where</span>);</span></span></span></span><br />
<br />
<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size"><span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size">I get an error:</span></span></span></span><br />
<br />
<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size"><span style="color: #4f5155;" class="mycode_color"><span style="font-size: small;" class="mycode_size">SELECT COUNT(*) AS `numrows` FROM `business_components` WHERE `email` = `richb201@gmail`.`com` AND `campaign` = `Apple`</span></span></span></span><br />
<br />
<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size"><span style="color: #4f5155;" class="mycode_color"><span style="font-size: small;" class="mycode_size">How do I stop the "." in the email address from being taken as just a "."? </span></span></span></span>]]></description>
			<content:encoded><![CDATA[<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size"><span style="color: #660000;" class="mycode_color">I am building this string to use in a query. </span></span></span><br />
<br />
<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size"><span style="color: #660000;" class="mycode_color">&#36;where</span>=  <span style="color: #660000;" class="mycode_color">&#36;where</span>=<span style="color: #067d17;" class="mycode_color">"email="</span>.<span style="color: #660000;" class="mycode_color">&#36;this</span>-&gt;<span style="color: #871094;" class="mycode_color">session</span>-&gt;<span style="color: #00627a;" class="mycode_color">userdata</span>(<span style="color: #067d17;" class="mycode_color">'userid'</span>).<span style="color: #067d17;" class="mycode_color">" AND campaign="</span>.<span style="color: #660000;" class="mycode_color">&#36;this</span>-&gt;<span style="color: #871094;" class="mycode_color">session</span>-&gt;<span style="color: #00627a;" class="mycode_color">userdata</span>(<span style="color: #067d17;" class="mycode_color">'campaign'</span>);</span></span><br />
<br />
<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size">In my example this correctly becomes:</span></span><br />
<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size">"email=richb201@gmail.com AND campaign=Apple"</span></span><br />
<br />
<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size">But when I try running the following line</span></span><br />
<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size"><span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size"><span style="color: #660000;" class="mycode_color">&#36;crud</span>-&gt;<span style="color: #00627a;" class="mycode_color">set_relation</span>(<span style="color: #067d17;" class="mycode_color">'bus_comp'</span>,<span style="color: #067d17;" class="mycode_color">'business_components'</span>,<span style="color: #067d17;" class="mycode_color">'bus_comp'</span>,<span style="color: #660000;" class="mycode_color">&#36;where</span>);</span></span></span></span><br />
<br />
<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size"><span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size">I get an error:</span></span></span></span><br />
<br />
<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size"><span style="color: #4f5155;" class="mycode_color"><span style="font-size: small;" class="mycode_size">SELECT COUNT(*) AS `numrows` FROM `business_components` WHERE `email` = `richb201@gmail`.`com` AND `campaign` = `Apple`</span></span></span></span><br />
<br />
<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size"><span style="color: #4f5155;" class="mycode_color"><span style="font-size: small;" class="mycode_size">How do I stop the "." in the email address from being taken as just a "."? </span></span></span></span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Full list of Database Drivers]]></title>
			<link>https://forum.codeigniter.com/thread-77510.html</link>
			<pubDate>Wed, 09 Sep 2020 23:09:53 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=29995">Omar Crespo</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/thread-77510.html</guid>
			<description><![CDATA[Hi, can anyone give me a list of all database drivers for CI3 and CI4. I mean, exactly what to whrite in:<br />
<br />
'dbdriver' =&gt; ' ';]]></description>
			<content:encoded><![CDATA[Hi, can anyone give me a list of all database drivers for CI3 and CI4. I mean, exactly what to whrite in:<br />
<br />
'dbdriver' =&gt; ' ';]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[deleting files with delete_files()  in helper]]></title>
			<link>https://forum.codeigniter.com/thread-77509.html</link>
			<pubDate>Wed, 09 Sep 2020 16:13:12 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=14246">richb201</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/thread-77509.html</guid>
			<description><![CDATA[I have two files I am trying to delete programmatically. Here is how I am doing it<br />
<br />
<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size"><span style="color: #660000;" class="mycode_color">&#36;file</span>=<span style="color: #067d17;" class="mycode_color">'/app/assets/uploads/files/'</span>.<span style="color: #660000;" class="mycode_color">&#36;user</span>-&gt;<span style="color: #871094;" class="mycode_color">file_url</span>;<br />
<span style="color: #660000;" class="mycode_color">&#36;iRc</span>=<span style="color: #000000;" class="mycode_color">delete_files</span>(<span style="color: #660000;" class="mycode_color">&#36;file</span>);  <span style="color: #8c8c8c;" class="mycode_color"><span style="font-style: italic;" class="mycode_i">//delete the pdf<br />
</span></span><span style="color: #8c8c8c;" class="mycode_color"><span style="font-style: italic;" class="mycode_i">//delete the thumbnail<br />
</span></span><span style="color: #660000;" class="mycode_color">&#36;iRc</span>=<span style="color: #000000;" class="mycode_color">delete_files</span>(<span style="color: #067d17;" class="mycode_color">'/app/'</span>.<span style="color: #660000;" class="mycode_color">&#36;user</span>-&gt;<span style="color: #871094;" class="mycode_color">thumbnail_url</span>);</span></span><br />
<br />
<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size">I am running in docker. Both these deletes fail (&#36;iRc=false). So I tried to delete from the cli and that seems to work. I did open a bin/bash session into the running container. I also took a look at the permissions and I see that although I am the owner (ME) and have read/write permissions, my application is running under group richb201 (I think) and that the group has "read only" permissions. How can I be sure that my app is under richb201, btw? How can I change the permissions programatically so that my app can rm these two. I am under Ubuntu. </span></span>]]></description>
			<content:encoded><![CDATA[I have two files I am trying to delete programmatically. Here is how I am doing it<br />
<br />
<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size"><span style="color: #660000;" class="mycode_color">&#36;file</span>=<span style="color: #067d17;" class="mycode_color">'/app/assets/uploads/files/'</span>.<span style="color: #660000;" class="mycode_color">&#36;user</span>-&gt;<span style="color: #871094;" class="mycode_color">file_url</span>;<br />
<span style="color: #660000;" class="mycode_color">&#36;iRc</span>=<span style="color: #000000;" class="mycode_color">delete_files</span>(<span style="color: #660000;" class="mycode_color">&#36;file</span>);  <span style="color: #8c8c8c;" class="mycode_color"><span style="font-style: italic;" class="mycode_i">//delete the pdf<br />
</span></span><span style="color: #8c8c8c;" class="mycode_color"><span style="font-style: italic;" class="mycode_i">//delete the thumbnail<br />
</span></span><span style="color: #660000;" class="mycode_color">&#36;iRc</span>=<span style="color: #000000;" class="mycode_color">delete_files</span>(<span style="color: #067d17;" class="mycode_color">'/app/'</span>.<span style="color: #660000;" class="mycode_color">&#36;user</span>-&gt;<span style="color: #871094;" class="mycode_color">thumbnail_url</span>);</span></span><br />
<br />
<span style="color: #080808;" class="mycode_color"><span style="font-size: x-small;" class="mycode_size">I am running in docker. Both these deletes fail (&#36;iRc=false). So I tried to delete from the cli and that seems to work. I did open a bin/bash session into the running container. I also took a look at the permissions and I see that although I am the owner (ME) and have read/write permissions, my application is running under group richb201 (I think) and that the group has "read only" permissions. How can I be sure that my app is under richb201, btw? How can I change the permissions programatically so that my app can rm these two. I am under Ubuntu. </span></span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Images files from javascript]]></title>
			<link>https://forum.codeigniter.com/thread-77508.html</link>
			<pubDate>Wed, 09 Sep 2020 14:50:37 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=30139">Resolution</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/thread-77508.html</guid>
			<description><![CDATA[Greetings, <br />
<br />
I'm continuing some existing projects referencing images via Javascript files e.g.<br />
var images=["&lt;img src='/images/chicken.png'&gt;","&lt;img src='<span style="font-weight: bold;" class="mycode_b">/images/pig.png'&gt;"]</span><br />
Is it possible to reference these directly from Javascript files located in the assets folder i.e. C:\xampp\htdocs\game\assets\images just for demo purposes, not best practice.<br />
Cheers]]></description>
			<content:encoded><![CDATA[Greetings, <br />
<br />
I'm continuing some existing projects referencing images via Javascript files e.g.<br />
var images=["&lt;img src='/images/chicken.png'&gt;","&lt;img src='<span style="font-weight: bold;" class="mycode_b">/images/pig.png'&gt;"]</span><br />
Is it possible to reference these directly from Javascript files located in the assets folder i.e. C:\xampp\htdocs\game\assets\images just for demo purposes, not best practice.<br />
Cheers]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Is there ane way to get all language lines?]]></title>
			<link>https://forum.codeigniter.com/thread-77507.html</link>
			<pubDate>Wed, 09 Sep 2020 12:14:58 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=30025">T.O.M.</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/thread-77507.html</guid>
			<description><![CDATA[In CI3 was ability to get all language lines as array with:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">lang</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">language&nbsp;<br /></span></code></div></div></div><br />
It is very useful for views - no need to list all the required language fields and just add all of them (from the loaded language files).<br />
<br />
I didn't find any way to do this in CI4. Is it possible?]]></description>
			<content:encoded><![CDATA[In CI3 was ability to get all language lines as array with:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">lang</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">language&nbsp;<br /></span></code></div></div></div><br />
It is very useful for views - no need to list all the required language fields and just add all of them (from the loaded language files).<br />
<br />
I didn't find any way to do this in CI4. Is it possible?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Confusion in documentation]]></title>
			<link>https://forum.codeigniter.com/thread-77506.html</link>
			<pubDate>Wed, 09 Sep 2020 09:44:36 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=30127">kelvinwongg</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/thread-77506.html</guid>
			<description><![CDATA[I go thru the documentation of CI4, and am confused in section:<br />
<br />
<span style="font-weight: bold;" class="mycode_b">General Topics &gt; Helper Functions &gt; Loading from Non-standard Locations</span><br />
codeigniter.com/user_guide/general/helpers.html#loading-from-non-standard-locations<br />
<br />
There the namespace of the Blog module is <span style="color: #ff4136;" class="mycode_color">'Example\Blog'</span>, but later referred as <span style="font-style: italic;" class="mycode_i">'</span><span style="color: #ff4136;" class="mycode_color">Modules\Blog' </span>when calling helper function, like so:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">helper</span><span style="color: #007700">(</span><span style="color: #DD0000">'Modules&#092;Blog&#092;blog'</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
I finally figured out that the "correct" way to call the helper is <span style="color: #333333;" class="mycode_color"><span style="font-size: small;" class="mycode_size"><span style="font-family: sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">helper('Example\Blog\blog');</span></span></span></span> OR register the namespace in the autoload config files as: <span style="font-weight: bold;" class="mycode_b">'Example\\Blog' =&gt; ROOTPATH . 'Modules/Blog',</span><br />
<br />
It would be a problem to CI4 and PSR-4 PHP namespace <span style="color: #333333;" class="mycode_color"><span style="font-size: small;" class="mycode_size"><span style="font-family: Tahoma, Verdana, Arial, sans-serif;" class="mycode_font">newbi</span></span></span><span style="color: #333333;" class="mycode_color"><span style="font-size: small;" class="mycode_size"><span style="font-family: Tahoma, Verdana, Arial, sans-serif;" class="mycode_font">e. If I am getting it right, </span></span></span>we should correct it?]]></description>
			<content:encoded><![CDATA[I go thru the documentation of CI4, and am confused in section:<br />
<br />
<span style="font-weight: bold;" class="mycode_b">General Topics &gt; Helper Functions &gt; Loading from Non-standard Locations</span><br />
codeigniter.com/user_guide/general/helpers.html#loading-from-non-standard-locations<br />
<br />
There the namespace of the Blog module is <span style="color: #ff4136;" class="mycode_color">'Example\Blog'</span>, but later referred as <span style="font-style: italic;" class="mycode_i">'</span><span style="color: #ff4136;" class="mycode_color">Modules\Blog' </span>when calling helper function, like so:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">helper</span><span style="color: #007700">(</span><span style="color: #DD0000">'Modules&#092;Blog&#092;blog'</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
I finally figured out that the "correct" way to call the helper is <span style="color: #333333;" class="mycode_color"><span style="font-size: small;" class="mycode_size"><span style="font-family: sans-serif;" class="mycode_font"><span style="font-weight: bold;" class="mycode_b">helper('Example\Blog\blog');</span></span></span></span> OR register the namespace in the autoload config files as: <span style="font-weight: bold;" class="mycode_b">'Example\\Blog' =&gt; ROOTPATH . 'Modules/Blog',</span><br />
<br />
It would be a problem to CI4 and PSR-4 PHP namespace <span style="color: #333333;" class="mycode_color"><span style="font-size: small;" class="mycode_size"><span style="font-family: Tahoma, Verdana, Arial, sans-serif;" class="mycode_font">newbi</span></span></span><span style="color: #333333;" class="mycode_color"><span style="font-size: small;" class="mycode_size"><span style="font-family: Tahoma, Verdana, Arial, sans-serif;" class="mycode_font">e. If I am getting it right, </span></span></span>we should correct it?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[CI4 e-commerce]]></title>
			<link>https://forum.codeigniter.com/thread-77505.html</link>
			<pubDate>Wed, 09 Sep 2020 07:51:28 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=28093">Jeewakapk</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/thread-77505.html</guid>
			<description><![CDATA[Hi<br />
anyone can tell me CI 4 opensource e-commerce that i can use for my work?<br />
<br />
thank you<br />
<br />
Jeewaka]]></description>
			<content:encoded><![CDATA[Hi<br />
anyone can tell me CI 4 opensource e-commerce that i can use for my work?<br />
<br />
thank you<br />
<br />
Jeewaka]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[active drop down dynamic menu from database codeigniter 4 and adminlte 3]]></title>
			<link>https://forum.codeigniter.com/thread-77504.html</link>
			<pubDate>Wed, 09 Sep 2020 04:45:16 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=30122">tataq17</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/thread-77504.html</guid>
			<description><![CDATA[<span style="color: #242729;" class="mycode_color"><span style="font-size: small;" class="mycode_size"><span style="font-family: Arial,;" class="mycode_font"> created application with codeigniter 4 and adminlte 3, I've problem with active dropdown sidebar dynamic menu from database, when menu is clicked drop down menu not open, but menu inside dropdown is active. how to make dropdown menu is always open menu when menu inside there is active. here's my code:</span></span></span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>   &lt;?php &#36;menu = amenu(); //helper access<br />
        &#36;request = &#92;Config&#92;Services::request();<br />
        &#36;uri = &#36;request-&gt;uri;<br />
        foreach (&#36;menu as &#36;a) : ?&gt;<br />
          &lt;?php &#36;submenu = aSubMenu(&#36;a['menu_id']); //helper access<br />
          if (&#36;submenu) : ?&gt;<br />
            &lt;li class="nav-item has-treeview &lt;?= &#36;uri-&gt;getPath() == &#36;a['menu_name'] ? 'menu-open' : '' ?&gt;"&gt;<br />
              &lt;a href=" &lt;?= &#36;a['menu_name']; ?&gt;" class="nav-link"&gt;<br />
                &lt;i class="nav-icon &lt;?= &#36;a['menu_icon']; ?&gt;"&gt;&lt;/i&gt;<br />
                &lt;p&gt;<br />
                  &lt;?= &#36;a['menu_name']; ?&gt;<br />
                  &lt;i class="right fas fa-angle-left"&gt;&lt;/i&gt;<br />
                &lt;/p&gt;<br />
              &lt;/a&gt;<br />
              &lt;ul class="nav nav-treeview"&gt;<br />
                &lt;?php foreach (&#36;submenu as &#36;sm) : ?&gt;<br />
                  &lt;li class="nav-item"&gt;<br />
                    &lt;a href="&lt;?= &#36;sm['sm_url']; ?&gt;" class="nav-link &lt;?= &#36;sm['sm_title'] == &#36;title ? "active" : "" ?&gt;"&gt;<br />
                      &lt;i class="far fa-circle nav-icon"&gt;&lt;/i&gt;<br />
                      &lt;p&gt;&lt;?= &#36;sm['sm_title']; ?&gt;&lt;/p&gt;<br />
                    &lt;/a&gt;<br />
                  &lt;/li&gt;<br />
                &lt;?php endforeach; ?&gt;<br />
              &lt;/ul&gt;<br />
            &lt;/li&gt;<br />
          &lt;?php else : ?&gt;<br />
            &lt;li class="nav-item has-treeview "&gt;<br />
              &lt;a href=" &lt;?= &#36;a['menu_url']; ?&gt;" class="nav-link &lt;?= &#36;a['menu_name'] == &#36;title ? "active" : "" ?&gt;"&gt;<br />
                &lt;i class="nav-icon &lt;?= &#36;a['menu_icon']; ?&gt;"&gt;&lt;/i&gt;<br />
                &lt;p&gt;<br />
                  &lt;?= &#36;a['menu_name']; ?&gt;<br />
                &lt;/p&gt;<br />
              &lt;/a&gt;<br />
            &lt;?php endif ?&gt;<br />
          &lt;?php endforeach; ?&gt;</code></div></div><span style="color: #242729;" class="mycode_color"><span style="font-size: small;" class="mycode_size"><span style="font-family: Arial,;" class="mycode_font">helper</span></span></span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>function amenu(){<br />
&#36;db = &#92;Config&#92;Database::connect();<br />
&#36;session = &#92;Config&#92;Services::session();<br />
&#36;role = &#36;session-&gt;get('users_role_id');<br />
&#36;query = "SELECT `menu_id`,`menu_name`,`menu_url`,`menu_icon`,`menu_is_active`<br />
            FROM `users_menu` JOIN `users_access_menu`<br />
            ON `users_menu`.`menu_id`=`users_access_menu`.`am_menu_id`<br />
            WHERE `users_access_menu`.`am_role_id`= &#36;role<br />
            and `menu_is_active`=1<br />
            ORDER BY `users_access_menu`.`am_menu_id` ASC";<br />
return &#36;db-&gt;query(&#36;query)-&gt;getResultArray();<br />
}<br />
<br />
function aSubMenu(&#36;sm){<br />
&#36;db = &#92;Config&#92;Database::connect();<br />
&#36;query = "SELECT *<br />
            FROM `users_sub_menu`<br />
            WHERE `sm_menu_id`= &#36;sm and `sm_is_active`=1";<br />
return &#36;db-&gt;query(&#36;query)-&gt;getResultArray();<br />
}</code></div></div>]]></description>
			<content:encoded><![CDATA[<span style="color: #242729;" class="mycode_color"><span style="font-size: small;" class="mycode_size"><span style="font-family: Arial,;" class="mycode_font"> created application with codeigniter 4 and adminlte 3, I've problem with active dropdown sidebar dynamic menu from database, when menu is clicked drop down menu not open, but menu inside dropdown is active. how to make dropdown menu is always open menu when menu inside there is active. here's my code:</span></span></span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>   &lt;?php &#36;menu = amenu(); //helper access<br />
        &#36;request = &#92;Config&#92;Services::request();<br />
        &#36;uri = &#36;request-&gt;uri;<br />
        foreach (&#36;menu as &#36;a) : ?&gt;<br />
          &lt;?php &#36;submenu = aSubMenu(&#36;a['menu_id']); //helper access<br />
          if (&#36;submenu) : ?&gt;<br />
            &lt;li class="nav-item has-treeview &lt;?= &#36;uri-&gt;getPath() == &#36;a['menu_name'] ? 'menu-open' : '' ?&gt;"&gt;<br />
              &lt;a href=" &lt;?= &#36;a['menu_name']; ?&gt;" class="nav-link"&gt;<br />
                &lt;i class="nav-icon &lt;?= &#36;a['menu_icon']; ?&gt;"&gt;&lt;/i&gt;<br />
                &lt;p&gt;<br />
                  &lt;?= &#36;a['menu_name']; ?&gt;<br />
                  &lt;i class="right fas fa-angle-left"&gt;&lt;/i&gt;<br />
                &lt;/p&gt;<br />
              &lt;/a&gt;<br />
              &lt;ul class="nav nav-treeview"&gt;<br />
                &lt;?php foreach (&#36;submenu as &#36;sm) : ?&gt;<br />
                  &lt;li class="nav-item"&gt;<br />
                    &lt;a href="&lt;?= &#36;sm['sm_url']; ?&gt;" class="nav-link &lt;?= &#36;sm['sm_title'] == &#36;title ? "active" : "" ?&gt;"&gt;<br />
                      &lt;i class="far fa-circle nav-icon"&gt;&lt;/i&gt;<br />
                      &lt;p&gt;&lt;?= &#36;sm['sm_title']; ?&gt;&lt;/p&gt;<br />
                    &lt;/a&gt;<br />
                  &lt;/li&gt;<br />
                &lt;?php endforeach; ?&gt;<br />
              &lt;/ul&gt;<br />
            &lt;/li&gt;<br />
          &lt;?php else : ?&gt;<br />
            &lt;li class="nav-item has-treeview "&gt;<br />
              &lt;a href=" &lt;?= &#36;a['menu_url']; ?&gt;" class="nav-link &lt;?= &#36;a['menu_name'] == &#36;title ? "active" : "" ?&gt;"&gt;<br />
                &lt;i class="nav-icon &lt;?= &#36;a['menu_icon']; ?&gt;"&gt;&lt;/i&gt;<br />
                &lt;p&gt;<br />
                  &lt;?= &#36;a['menu_name']; ?&gt;<br />
                &lt;/p&gt;<br />
              &lt;/a&gt;<br />
            &lt;?php endif ?&gt;<br />
          &lt;?php endforeach; ?&gt;</code></div></div><span style="color: #242729;" class="mycode_color"><span style="font-size: small;" class="mycode_size"><span style="font-family: Arial,;" class="mycode_font">helper</span></span></span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>function amenu(){<br />
&#36;db = &#92;Config&#92;Database::connect();<br />
&#36;session = &#92;Config&#92;Services::session();<br />
&#36;role = &#36;session-&gt;get('users_role_id');<br />
&#36;query = "SELECT `menu_id`,`menu_name`,`menu_url`,`menu_icon`,`menu_is_active`<br />
            FROM `users_menu` JOIN `users_access_menu`<br />
            ON `users_menu`.`menu_id`=`users_access_menu`.`am_menu_id`<br />
            WHERE `users_access_menu`.`am_role_id`= &#36;role<br />
            and `menu_is_active`=1<br />
            ORDER BY `users_access_menu`.`am_menu_id` ASC";<br />
return &#36;db-&gt;query(&#36;query)-&gt;getResultArray();<br />
}<br />
<br />
function aSubMenu(&#36;sm){<br />
&#36;db = &#92;Config&#92;Database::connect();<br />
&#36;query = "SELECT *<br />
            FROM `users_sub_menu`<br />
            WHERE `sm_menu_id`= &#36;sm and `sm_is_active`=1";<br />
return &#36;db-&gt;query(&#36;query)-&gt;getResultArray();<br />
}</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Cannot load manifest.json file]]></title>
			<link>https://forum.codeigniter.com/thread-77503.html</link>
			<pubDate>Wed, 09 Sep 2020 03:02:33 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=30119">taysonvo</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/thread-77503.html</guid>
			<description><![CDATA[Hi all,<br />
<br />
I have create a manifest.json file and put it the root same place of index.php file and try to load in in the header tag using the below:<br />
<br />
<br />
<blockquote class="mycode_quote"><cite>Quote:</cite>&lt;link rel="manifest" href="manifest.json"&gt;</blockquote>
<br />
<br />
But it cannot be loaded, server response with 404 in the console.<br />
Anyone experiencing the same issue or know how to load manifest for CI, please help me.<br />
<br />
Thanks a lot!<br />
<br />
Regards,<br />
Son]]></description>
			<content:encoded><![CDATA[Hi all,<br />
<br />
I have create a manifest.json file and put it the root same place of index.php file and try to load in in the header tag using the below:<br />
<br />
<br />
<blockquote class="mycode_quote"><cite>Quote:</cite>&lt;link rel="manifest" href="manifest.json"&gt;</blockquote>
<br />
<br />
But it cannot be loaded, server response with 404 in the console.<br />
Anyone experiencing the same issue or know how to load manifest for CI, please help me.<br />
<br />
Thanks a lot!<br />
<br />
Regards,<br />
Son]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Using Maria/MySQL Internal Time Functions in the Builder Class?]]></title>
			<link>https://forum.codeigniter.com/thread-77502.html</link>
			<pubDate>Tue, 08 Sep 2020 22:40:16 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=24921">stlake2011</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/thread-77502.html</guid>
			<description><![CDATA[Hi guys, <br />
<br />
Quick question, minor problem (I think)!<br />
<br />
I am trying to update a 'DateTime' column in MariaDB/MySQL using the builder class but I keep getting this error:<br />
<br />
<span style="color: #c10300;" class="mycode_color"><span style="font-size: large;" class="mycode_size">Call to undefined function App\Models\now() </span> </span><br />
<br />
<span style="color: #000000;" class="mycode_color">I tried setting the update column using the following methods:</span><br />
<br />
<span style="color: #000000;" class="mycode_color">Method 1:</span><br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;UpdateData&nbsp;</span><span style="color: #007700">=&nbsp;[<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">'title'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;title</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">'slug'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;slug</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">'updated'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">NOW</span><span style="color: #007700">(),<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">'post'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;post<br /></span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;<br />&#36;builder</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">where</span><span style="color: #007700">(</span><span style="color: #DD0000">'slug'</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;slug</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">&#36;builder</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">update</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;UpdateData</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
<span style="color: #000000;" class="mycode_color">Method 2:</span><br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;builder</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">set</span><span style="color: #007700">(</span><span style="color: #DD0000">'updated=NOW()'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;builder</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">where</span><span style="color: #007700">(</span><span style="color: #DD0000">'slug'</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;slug</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">&#36;builder</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">update</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;UpdateData</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
<span style="color: #000000;" class="mycode_color">Method 3: </span><br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;builder</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">set</span><span style="color: #007700">(</span><span style="color: #DD0000">'updated'</span><span style="color: #007700">,</span><span style="color: #0000BB">NOW</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">&#36;builder</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">where</span><span style="color: #007700">(</span><span style="color: #DD0000">'slug'</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;slug</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">&#36;builder</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">update</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;UpdateData</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
<br />
<span style="color: #000000;" class="mycode_color">Is there something I am missing here? Or is it impossible to work with Maria/MySQL's internal functions using the Builder Class?</span><br />
<br />
<span style="color: #000000;" class="mycode_color">No biggie if its impossible, as I can always resort to PHP Date/Time functions and have PHP do the work instead of MariaDB doing it. </span><br />
<span style="color: #000000;" class="mycode_color">So this is more of a curiosity question as well as a serious one. </span>]]></description>
			<content:encoded><![CDATA[Hi guys, <br />
<br />
Quick question, minor problem (I think)!<br />
<br />
I am trying to update a 'DateTime' column in MariaDB/MySQL using the builder class but I keep getting this error:<br />
<br />
<span style="color: #c10300;" class="mycode_color"><span style="font-size: large;" class="mycode_size">Call to undefined function App\Models\now() </span> </span><br />
<br />
<span style="color: #000000;" class="mycode_color">I tried setting the update column using the following methods:</span><br />
<br />
<span style="color: #000000;" class="mycode_color">Method 1:</span><br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;UpdateData&nbsp;</span><span style="color: #007700">=&nbsp;[<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">'title'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;title</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">'slug'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;slug</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">'updated'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">NOW</span><span style="color: #007700">(),<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">'post'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;post<br /></span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;<br />&#36;builder</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">where</span><span style="color: #007700">(</span><span style="color: #DD0000">'slug'</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;slug</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">&#36;builder</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">update</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;UpdateData</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
<span style="color: #000000;" class="mycode_color">Method 2:</span><br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;builder</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">set</span><span style="color: #007700">(</span><span style="color: #DD0000">'updated=NOW()'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;builder</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">where</span><span style="color: #007700">(</span><span style="color: #DD0000">'slug'</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;slug</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">&#36;builder</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">update</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;UpdateData</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
<span style="color: #000000;" class="mycode_color">Method 3: </span><br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;builder</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">set</span><span style="color: #007700">(</span><span style="color: #DD0000">'updated'</span><span style="color: #007700">,</span><span style="color: #0000BB">NOW</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">&#36;builder</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">where</span><span style="color: #007700">(</span><span style="color: #DD0000">'slug'</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;slug</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">&#36;builder</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">update</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;UpdateData</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
<br />
<span style="color: #000000;" class="mycode_color">Is there something I am missing here? Or is it impossible to work with Maria/MySQL's internal functions using the Builder Class?</span><br />
<br />
<span style="color: #000000;" class="mycode_color">No biggie if its impossible, as I can always resort to PHP Date/Time functions and have PHP do the work instead of MariaDB doing it. </span><br />
<span style="color: #000000;" class="mycode_color">So this is more of a curiosity question as well as a serious one. </span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[ErrorException Trying to access array offset on value of type null]]></title>
			<link>https://forum.codeigniter.com/thread-77501.html</link>
			<pubDate>Tue, 08 Sep 2020 15:08:45 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=30116">mrardiyansyah</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/thread-77501.html</guid>
			<description><![CDATA[I just upgraded XAMPP and PHP version 7.49 and opened a project under development getting an error "<span style="font-weight: bold;" class="mycode_b">ErrorException</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Trying to access array offset on value of type null</span>" but previously there was no such error. Can anyone solve the problem?]]></description>
			<content:encoded><![CDATA[I just upgraded XAMPP and PHP version 7.49 and opened a project under development getting an error "<span style="font-weight: bold;" class="mycode_b">ErrorException</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Trying to access array offset on value of type null</span>" but previously there was no such error. Can anyone solve the problem?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Timestamp Inconsistency]]></title>
			<link>https://forum.codeigniter.com/thread-77500.html</link>
			<pubDate>Tue, 08 Sep 2020 12:34:05 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=23459">Gary</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/thread-77500.html</guid>
			<description><![CDATA[Having recently experimented with time zones, I find there is an inconsistency in the way CI handles its timestamps (mostly used in &#36;useSoftDeletes / &#36;createdField functionality):<br />
<br />
The code in Model.php that handles the timestamps is as follows:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>protected function setDate(int &#36;userData = null)<br />
 {<br />
  &#36;currentDate = is_numeric(&#36;userData) ? (int) &#36;userData : time();<br />
<br />
  switch (&#36;this-&gt;dateFormat)<br />
  {<br />
    case 'int':<br />
      return &#36;currentDate;<br />
    case 'datetime':<br />
      return date('Y-m-d H:i:s', &#36;currentDate);<br />
    case 'date':<br />
      return date('Y-m-d', &#36;currentDate);</code></div></div><br />
Case 'int' returns the time in UTC (GMT) whereas 'datetime' and 'date' both return the time in localized time... which makes it a horrible can of worms to manage in the application code if one has users in more than one time zone (or a user reconfigures their time zone).<br />
<br />
I'd propose EITHER:<br />
<br />
1) standardizing it (and conform to what some believe is 'best practice') to always NOT use zone'd timestamps (ie: making the same timestamp as 'int' be returned in all cases- easily done by using gmdate() in place of the two date() functions.<br />
<br />
or<br />
<br />
2) add two new (additional) cases, which would make it backward-compatible with what currently exists:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>case 'datetime_utc':<br />
      return gmdate('Y-m-d H:i:s', &#36;currentDate);<br />
case 'date_utc':<br />
      return gmdate('Y-m-d', &#36;currentDate);</code></div></div><br />
Personally, I find 2) less desirable because it leans toward making what should be the 'standard' (and consistent) response a special case.  I'd propose implementing 1) and then, if local time options were still desired, implement those as the special cases, perhaps with 'datetime_local' and 'date_local' options.]]></description>
			<content:encoded><![CDATA[Having recently experimented with time zones, I find there is an inconsistency in the way CI handles its timestamps (mostly used in &#36;useSoftDeletes / &#36;createdField functionality):<br />
<br />
The code in Model.php that handles the timestamps is as follows:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>protected function setDate(int &#36;userData = null)<br />
 {<br />
  &#36;currentDate = is_numeric(&#36;userData) ? (int) &#36;userData : time();<br />
<br />
  switch (&#36;this-&gt;dateFormat)<br />
  {<br />
    case 'int':<br />
      return &#36;currentDate;<br />
    case 'datetime':<br />
      return date('Y-m-d H:i:s', &#36;currentDate);<br />
    case 'date':<br />
      return date('Y-m-d', &#36;currentDate);</code></div></div><br />
Case 'int' returns the time in UTC (GMT) whereas 'datetime' and 'date' both return the time in localized time... which makes it a horrible can of worms to manage in the application code if one has users in more than one time zone (or a user reconfigures their time zone).<br />
<br />
I'd propose EITHER:<br />
<br />
1) standardizing it (and conform to what some believe is 'best practice') to always NOT use zone'd timestamps (ie: making the same timestamp as 'int' be returned in all cases- easily done by using gmdate() in place of the two date() functions.<br />
<br />
or<br />
<br />
2) add two new (additional) cases, which would make it backward-compatible with what currently exists:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>case 'datetime_utc':<br />
      return gmdate('Y-m-d H:i:s', &#36;currentDate);<br />
case 'date_utc':<br />
      return gmdate('Y-m-d', &#36;currentDate);</code></div></div><br />
Personally, I find 2) less desirable because it leans toward making what should be the 'standard' (and consistent) response a special case.  I'd propose implementing 1) and then, if local time options were still desired, implement those as the special cases, perhaps with 'datetime_local' and 'date_local' options.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[REST Server Returns 403-Forbidden Error]]></title>
			<link>https://forum.codeigniter.com/thread-77499.html</link>
			<pubDate>Tue, 08 Sep 2020 12:18:00 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=22188">ezxcess</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/thread-77499.html</guid>
			<description><![CDATA[Hi. I have installed a RESTful Server using <a href="https://github.com/chriskacerguis/codeigniter-restserver" target="_blank" rel="noopener" class="mycode_url">https://github.com/chriskacerguis/codeig...restserver</a>. I installed it using Composer and created a controller. When I test it using POSTMAN, I am getting 404 - Forbidden error message. What am I doing wrong.<br />
<br />
Here is the controller.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br />defined</span><span style="color: #007700">(</span><span style="color: #DD0000">'BASEPATH'</span><span style="color: #007700">)&nbsp;OR&nbsp;exit(</span><span style="color: #DD0000">'No&nbsp;direct&nbsp;script&nbsp;access&nbsp;allowed'</span><span style="color: #007700">);<br /><br />use&nbsp;</span><span style="color: #0000BB">Restserver</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">Libraries</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">REST_Controller</span><span style="color: #007700">;<br />require(</span><span style="color: #0000BB">APPPATH&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'libraries/REST_Controller.php'</span><span style="color: #007700">);<br /><br />class&nbsp;</span><span style="color: #0000BB">Webapi&nbsp;</span><span style="color: #007700">extends&nbsp;</span><span style="color: #0000BB">REST_Controller<br /></span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;Define&nbsp;global&nbsp;variables<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">var&nbsp;</span><span style="color: #0000BB">&#36;postData</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">/**&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@desc&nbsp;Class&nbsp;constructor<br />&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@author&nbsp;Allie&nbsp;Syadiqin<br />&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@access&nbsp;public<br />&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;void<br />&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;NULL<br />&nbsp;&nbsp;&nbsp;&nbsp;*/<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">__construct</span><span style="color: #007700">()<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;Construct&nbsp;the&nbsp;parent&nbsp;class<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">parent</span><span style="color: #007700">::</span><span style="color: #0000BB">__construct</span><span style="color: #007700">();<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;Load&nbsp;libraries<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">load</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">library</span><span style="color: #007700">(</span><span style="color: #DD0000">'template/acd_api_lib'</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;Load&nbsp;models<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">load</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">model</span><span style="color: #007700">(</span><span style="color: #DD0000">'template/acd_api_model'</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;Set&nbsp;XSS&nbsp;filtering<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">postData&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">input</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">post</span><span style="color: #007700">(</span><span style="color: #0000BB">null</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;Define&nbsp;current&nbsp;time&nbsp;with&nbsp;local&nbsp;timezone<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;currentDateObj&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">"now"</span><span style="color: #007700">,&nbsp;new&nbsp;</span><span style="color: #0000BB">DateTimeZone</span><span style="color: #007700">(</span><span style="color: #DD0000">'Australia/Brisbane'</span><span style="color: #007700">)&nbsp;);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">currentDateTime&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;currentDateObj</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;End&nbsp;class&nbsp;constructor<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;/**<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@desc&nbsp;Endpoint&nbsp;to&nbsp;authenticate&nbsp;user<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@author&nbsp;Allie&nbsp;Syadiqin<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@access&nbsp;public<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;void<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;REST_Controller&nbsp;response<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">authenticate_post</span><span style="color: #007700">()<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;Define&nbsp;variables<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;apiKey&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">postData</span><span style="color: #007700">[</span><span style="color: #DD0000">'apiKey'</span><span style="color: #007700">];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;providerId&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">postData</span><span style="color: #007700">[</span><span style="color: #DD0000">'providerId'</span><span style="color: #007700">];<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">printr</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">postData</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;End&nbsp;method&nbsp;authenticate_post()<br /></span><span style="color: #007700">}<br /></span><span style="color: #FF8000">//&nbsp;End&nbsp;class&nbsp;Webapi&nbsp;<br /></span></code></div></div></div>]]></description>
			<content:encoded><![CDATA[Hi. I have installed a RESTful Server using <a href="https://github.com/chriskacerguis/codeigniter-restserver" target="_blank" rel="noopener" class="mycode_url">https://github.com/chriskacerguis/codeig...restserver</a>. I installed it using Composer and created a controller. When I test it using POSTMAN, I am getting 404 - Forbidden error message. What am I doing wrong.<br />
<br />
Here is the controller.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br />defined</span><span style="color: #007700">(</span><span style="color: #DD0000">'BASEPATH'</span><span style="color: #007700">)&nbsp;OR&nbsp;exit(</span><span style="color: #DD0000">'No&nbsp;direct&nbsp;script&nbsp;access&nbsp;allowed'</span><span style="color: #007700">);<br /><br />use&nbsp;</span><span style="color: #0000BB">Restserver</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">Libraries</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">REST_Controller</span><span style="color: #007700">;<br />require(</span><span style="color: #0000BB">APPPATH&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'libraries/REST_Controller.php'</span><span style="color: #007700">);<br /><br />class&nbsp;</span><span style="color: #0000BB">Webapi&nbsp;</span><span style="color: #007700">extends&nbsp;</span><span style="color: #0000BB">REST_Controller<br /></span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;Define&nbsp;global&nbsp;variables<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">var&nbsp;</span><span style="color: #0000BB">&#36;postData</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">/**&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@desc&nbsp;Class&nbsp;constructor<br />&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@author&nbsp;Allie&nbsp;Syadiqin<br />&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@access&nbsp;public<br />&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;void<br />&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;NULL<br />&nbsp;&nbsp;&nbsp;&nbsp;*/<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">__construct</span><span style="color: #007700">()<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;Construct&nbsp;the&nbsp;parent&nbsp;class<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">parent</span><span style="color: #007700">::</span><span style="color: #0000BB">__construct</span><span style="color: #007700">();<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;Load&nbsp;libraries<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">load</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">library</span><span style="color: #007700">(</span><span style="color: #DD0000">'template/acd_api_lib'</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;Load&nbsp;models<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">load</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">model</span><span style="color: #007700">(</span><span style="color: #DD0000">'template/acd_api_model'</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;Set&nbsp;XSS&nbsp;filtering<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">postData&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">input</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">post</span><span style="color: #007700">(</span><span style="color: #0000BB">null</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;Define&nbsp;current&nbsp;time&nbsp;with&nbsp;local&nbsp;timezone<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;currentDateObj&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">"now"</span><span style="color: #007700">,&nbsp;new&nbsp;</span><span style="color: #0000BB">DateTimeZone</span><span style="color: #007700">(</span><span style="color: #DD0000">'Australia/Brisbane'</span><span style="color: #007700">)&nbsp;);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">currentDateTime&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;currentDateObj</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;End&nbsp;class&nbsp;constructor<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;/**<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@desc&nbsp;Endpoint&nbsp;to&nbsp;authenticate&nbsp;user<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@author&nbsp;Allie&nbsp;Syadiqin<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@access&nbsp;public<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;void<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;REST_Controller&nbsp;response<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">authenticate_post</span><span style="color: #007700">()<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;Define&nbsp;variables<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;apiKey&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">postData</span><span style="color: #007700">[</span><span style="color: #DD0000">'apiKey'</span><span style="color: #007700">];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;providerId&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">postData</span><span style="color: #007700">[</span><span style="color: #DD0000">'providerId'</span><span style="color: #007700">];<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">printr</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">postData</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;End&nbsp;method&nbsp;authenticate_post()<br /></span><span style="color: #007700">}<br /></span><span style="color: #FF8000">//&nbsp;End&nbsp;class&nbsp;Webapi&nbsp;<br /></span></code></div></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Sessions, how?]]></title>
			<link>https://forum.codeigniter.com/thread-77498.html</link>
			<pubDate>Tue, 08 Sep 2020 12:02:17 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.codeigniter.com/member.php?action=profile&uid=7907">blaasvaer</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.codeigniter.com/thread-77498.html</guid>
			<description><![CDATA[I seem to constantly having a hard time reading and actually USING the docs:<br />
<br />
Can someone tell med HOW, WHERE and WHEN to use this:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>&#36;session = &#92;Config&#92;Services::session(&#36;config);<br />
<br />
or<br />
<br />
&#36;session = &#92;Config&#92;Services::session(); // Without the &#36;config</code></div></div><br />
<br />
It's the first line of 'code' in the docs about the Session Library (<a href="https://codeigniter4.github.io/userguide/libraries/sessions.html?highlight=session" target="_blank" rel="noopener" class="mycode_url">https://codeigniter4.github.io/userguide...ht=session</a>) ... but I cannot – from the docs – figure out HOW to implement and USE it.<br />
<br />
If I put it into a Controller, I get this:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>syntax error, unexpected '&#36;session' (T_VARIABLE), expecting function (T_FUNCTION) or const (T_CONST)</code></div></div><br />
Can somone explain why I'm getting this, and what it is that I seem to be constantly missing when 'reading' the docs?<br />
<br />
I see this a LOT in the docs '&#36;variable = something … ', but WHENEVER I try to implement what I'm reading in the docs I ALWAYS get errors.<br />
<br />
Now, does:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>&#36;variable = ...</code></div></div><br />
in the docs have some 'magical' meaning (should it be 'read' in some particular way)? Or is it simply because the docs 'assume' YOU know where you're supposed to 'put' this code ... and therefore leaving out the (not so) 'obvious'?]]></description>
			<content:encoded><![CDATA[I seem to constantly having a hard time reading and actually USING the docs:<br />
<br />
Can someone tell med HOW, WHERE and WHEN to use this:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>&#36;session = &#92;Config&#92;Services::session(&#36;config);<br />
<br />
or<br />
<br />
&#36;session = &#92;Config&#92;Services::session(); // Without the &#36;config</code></div></div><br />
<br />
It's the first line of 'code' in the docs about the Session Library (<a href="https://codeigniter4.github.io/userguide/libraries/sessions.html?highlight=session" target="_blank" rel="noopener" class="mycode_url">https://codeigniter4.github.io/userguide...ht=session</a>) ... but I cannot – from the docs – figure out HOW to implement and USE it.<br />
<br />
If I put it into a Controller, I get this:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>syntax error, unexpected '&#36;session' (T_VARIABLE), expecting function (T_FUNCTION) or const (T_CONST)</code></div></div><br />
Can somone explain why I'm getting this, and what it is that I seem to be constantly missing when 'reading' the docs?<br />
<br />
I see this a LOT in the docs '&#36;variable = something … ', but WHENEVER I try to implement what I'm reading in the docs I ALWAYS get errors.<br />
<br />
Now, does:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>&#36;variable = ...</code></div></div><br />
in the docs have some 'magical' meaning (should it be 'read' in some particular way)? Or is it simply because the docs 'assume' YOU know where you're supposed to 'put' this code ... and therefore leaving out the (not so) 'obvious'?]]></content:encoded>
		</item>
	</channel>
</rss>