How to use this form_open_multipart? - codeigniter-3

<?php echo form_open_multipart('uploads/do_upload');?>
This is from codiegnater documentation. But cant use it because of this error Message: Call to undefined function form_open_multipart()

You need to use:
$this->load->helper('form');

Related

Error connect between PostgreSQL and XAMPP

Can someone help me to fixing the problem about connecting PostgreSQL with XAMPP?
The error is :
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Misc has a deprecated constructor in C:\xampp\phpPgAdmin\classes\Misc.php on line 8
I use PostgreSQL version 9.6.2-3 and XAMPP 7.1.1.0
That (notice) message is based on changes to PHP 7.
So an old way of using a constructor is still in use, is what that message means. It will be ok at the moment, until the support is completely removed in the future. However, I don't believe that should/would cause any connection trouble ?
What is expected is instead of having a class with a constructor like this:
<?php
class foo {
function foo() {
echo 'I am the constructor';
}
}
?>
... would now be expected to look like this:
<?php
class foo {
function __construct() {
echo 'I am the constructor';
}
}
?>
See the first section section of this PHP 7 deprecation info.
You could apply that change yourself, just comment-out the old way, and use the other constructor form.

SAPUI5 - Uncaught TypeError: this.getRouter.navTo is not a function

I am referring to the code used in tdg master-detail demokit application.
I am getting an error "Uncaught TypeError: this.getRouter.navTo is not a function".
I have written a console.log("is router fine? "+ this.getRouter().toLocaleString()); before this.getRouter.navTo which prints as
"EventProvider company.accounts_positions_splitpage.MyRouter"
Any suggestions what is the issue?
Thanks
You have to call
this.getRouter().navTo()
instead of
this.getRouter.navTo()
With this.getRouter you do not execute the function, you just get the function as Object. There you try too execute the function navTo(), but that object itselve does not provide such a function.
With this.getRouter() you execute the function and you get the return value (a router) as Object. On that router you can now use navTo(), as you did in your console.log.

method not found Apache2::RequesUtil->request

i have a small problem whith SOAP::Lite,
When i try to run the following code, i have this error (Can’t locate object method “request” via package “Apache2::RequesUtil” at b.pl line 3) :
#!/usr/bin/perl
use SOAP::Transport::HTTP2;
Apache2::RequestUtil->request();
any idea ?
use Apache2::RequestUtil ();

Zend Sessions getting error as Undefined Variable

If I Declare a session Variable, $_SESSION['user']= $user;, I will get error as
Undefined Variable _session in line 132.
I really appreciate any help regarding this problem.
In the php.ini declare
session.auto_start = 0
OR
use session_start(); before using any session variable. More preciously:
session_start();
$_SESSION['user']= $user;

ZEND execute/call function stored in string

i have a problem with calling a function which name is a string.
I made few helpers which i want to echo in my phtml file like this:
echo $this->EditProfile();
echo $this->ViewProfile();
The EditProfile() and ViewProfile() are names of the View Helpers which i created and i'm calling them in view. And this method is working fine. But when i want dynamicly call a function by name stored in database im trying to do this in this way:
im getting the names of helpers from database and store them into array and then trying to display them in foreach.
foreach ($this->modules as $key => $module)
{
echo $this->$module['name'];
}
the variable
$module['name']
contains a valid name of Helper which i want to call in phtml file (checked with Zend_debug::dump() and with just an echo $module['name'] in foeach and id display it properly... but this echo its not working and not calling the View Helper, nothing is displayed
when i try eval or call_user_func too nothing is displayed too... How can i do this in foreach or other loop?
ok solved it myself :)
dont know is this solution properly but its actually working ;)
instead call_user_func i mentioned that magical function __call is same as call_user_func_array
so i edited code like this below
foreach ($this->modules as $key => $module)
{
$this->__call($module['name'],array(null));
}
in this case array is null cause none parameters are passed to function. If in my helper ill need parameters ill pass them in this array in future.
And this solution works fine for me :)
If someone have better solution please post it here and share your opinion ;)
regards
Darek