codeigniter image reader prob - codeigniter

Hi im making a image gallery in useing the following tutorial at
http://superdit.com/2010/06/27/basic-image-gallery-with-codeigniter/
i keep getting this error
wrong parameter count for strstr()
google'd and tried this and found i needed to remove a third parameter.
I removed the third parameter from line38 $ext = strrev(strstr(strrev($file), ".", TRUE));
now all errors are gone but the image uploading will not work any ideas why this is now failing ?????
Thanks Alan

hi I think that tutorial using PHP 5.3 so the strstr function has the third parameter

Related

Pluck give string instead of integer

I use laravel 9.25.1 and php 8.1.8.
I have script $this->productId = $guest->products()->pluck('product_id')->toArray();
This script give me integer in localhost but it gives me string in hosting.
I browsed everywhere to find the root cause and found in https://laracasts.com/discuss/channels/laravel/pluck-id-integer-cast-to-string that it seems bug in laravel 5 but still happens in laravel 9?
Or is there anything I did wrong?
screenshot 1
screenshot 2

laravel carbon isoFormat method does not exist

I tried to use the Laravel carbon isoFormat method. I received the error Method isoFormat does not exist. My Laravel implementation is 5.7. I tried composer update, and verified that it updated nesbot/carbon.
I copied and pasted code from Mr. Nesbot's manual to see if his code would work.
$mutable = Carbon::now();
var_dump($mutable->isoFormat('dddd D'));
Mr. Nesbot's code produces the same error.
How do I resolve this error, please?
Try the following:
$carbon = new Carbon('now');
$formatted = $carbon->toIso8601String();
var_dump($formatted);

How to return CKEditorFuncNum?

$funcNum = $_GET['CKEditorFuncNum'] ; is not returning the number.
I tried creating the upload.php for ckeditor uploadimage plugin according to
https://stackoverflow.com/a/44553006/8719001 (sorry can't add comments yet)
which includes echo "<script type='text/javascript'>window.parent.CKEDITOR.tools.callFunction($funcNum, '$url', '$message');</script>";
However when I drop images it doesn't work and in the console I get the Response Text which doesn't show any funcNumber:
"<script type='text/javascript'>window.parent.CKEDITOR.tools.callFunction(, 'https://example.com/upload/test.jpg', '');</script>"
I think this might be part of filebrowser plugin?
Which I have enabled and also declared $settings['filebrowserUploadUrl'] =
Try to setup config.js insert config.filebrowserUploadMethod = 'form';,if you got CKEditor additional arguments empty,(CKEditor,langCode,CKEditorFuncNum). There are some errors occur,
Incorrect server response. and [CKEDITOR] Error code: filetools-response-error..
please refer,https://github.com/ckeditor/ckeditor-dev/issues/1894
This is the version problem.
I tried 2 hours and couldn't get the parameter CKEditorFuncNum with java like you.
After I changed my 4.9.1 version to 4.7.3, it worked.

Joomla - Fatal error: Class 'JParameter' not found

I'm trying to upgrade Joomla 2.5.22 to 3.5.1, and last time I checked the progress bar, it was 86 %. I looked away for a moment and when I came back to check I saw the below error message.
Fatal error: Class 'JParameter' not found in
/home/mywebsite/public_html/plugins/system/bigshotgoogleanalytics/bigshotgoogleanalytics.php on line 24
What is the cause of this error and how would it be fixed?
Joomla can't find JParameter Class, so you have to use
jimport( 'joomla.html.parameter' );
before using JParameter class
bigshotanalytics is one of those plugins that cause a blank page or, at best, a fatal error when updating Joomla. This is because of its old code. I suggest you move the tracking code to your template. You can also add the tracking code to a custom HTML module (after removing the encapsulating div through an override) and then assign the module to a position in your template (the position should be in the section of the HTML).
Now to answer your question, Joomla no longer uses JParameter - it uses JRegistry instead. So something like:
$jparameter = new JParameter('param1');
Should be changed to:
$jregistry= new JRegistry();
$jparameter = $jregistry->get('param1');

phmagick class not found on laravel 4

After installing phmagick using composer I'm getting a class not found error. I think it's because of how the Action classes are being loaded, but is there a fix for it?
Have a look in vendor/francodacosta/phmagick/docs/index.html for actual documentation about phMagick. Here's one of the examples which works for me...
$phMagick = new \phMagick\Core\Runner();
$action = new \phMagick\Action\Convert($this->originalFile, $this->newFile);
// optimize the image
$action->optimize();
// sets image quality
$action->quality(70);
// execute the convert action
$phMagick->run($action);

Resources