I would like to modify TinyFileManager.php from https://tinyfilemanager.github.io/ to accept a URL parameter to replace the hard coded "$root_path = ”; and the "$root_path = ”;. I have tried replacing it with $root_path = $_GET[‘myRoot’]; and using domain.com/tinyfilemanager.php?myRoot=/rfq_documents/2071 as the url. I also modified the ‘//always use ?p lines to be: // always use ?p= ..

Read more

How do I repeat the serial numbers from 000 to 999 in php and save it in a txt file For example, I have this code <?php $bb=fopen(‘log.txt’,’w’); for ($i=0;$i<=999;$i++) echo str_pad($i,5,"0",STR_PAD_LEFT),"n","<br/>"; fwrite($bb,"$i"); fclose($bb); ?> I want to make it like this <?php $bb=fopen(‘log.txt’,’w’); for ($i=0;$i<=999;$i++) $mm = str_pad($i,5,"0",STR_PAD_LEFT),"n","<br/>"; fwrite($bb,"$mm"); fclose($bb); ?> Sourc..

Read more

I have my Codeigniter application running in htdocs ==> htdocs/ciapp And core php application also in htdocs ==> htdocs/coreapp Both apps are using a single MySQL DB User lands on ciapp and login there, Afterwards, the user goes to coreapp and also login there. Authentication is done from the same user table (using the same ..

Read more

I’m really new to Kirby and PHP and I try to use 2 variables in a Snippet. This is my Code right now <div class="container"> <h2><?= $variable1 ?></h2> <?php foreach (page(‘blogs’) ->children() ->listed() ->filterBy(‘tags’, ‘variable2’, ‘,’) ->flip() as $subpage) : snippet(‘blogkarte’, [‘subpage’ => $subpage]); ?> <?php endforeach ?> I understand how to use the $title ..

Read more

Hi I’m trying to create a custom plugin that will display the main product image from Woocommerce plugin. I want to use shortcode. How do I go about doing this? This is what I had and it didn’t work. I’ve also found different suggestions. I will share everything below add_shortcode( ‘product_image’, ‘bbloomer_product_image_shortcode’ ); function bbloomer_product_reviews_shortcode() ..

Read more

I want to get all of route and register to fake.php file like this: $getRouteCollection = Route::getRoutes(); //get and returns all returns route collection foreach ($getRouteCollection as $route) { Route::{‘fake/’ . $route->methods()[0]}($route->uri, [$route->getController(), $route->function()]); } i need to add prefix to all of route, and all routes work like before. Sourc..

Read more