I use a php file to created zip archive of all jpg files in a folder and make it available for download. Here is the script: I was wondering if it is possible to use part of url as archive name? My URLS look like this: I want the archive name to be Pictures-Album-CustomText.zip Answer You have a couple of
calculating button size using foreach
I follow the example along the PHP and MySQL Web Development by Luke Welling and Laura Thomson. in chapter 6 there a //calculate button size that has each()function that deprecated in 7.2. According …
WordPress custom file upload being overwritten on no file selection
I’m working on a custom theme that allows you to upload multiple images on one page. Since I have multiple file inputs, I use this function in my functions.php file (inside a loop for each file input): The inline function is the only thing I’ve tried that works for multiple files at a time. Either…
How can I get the value from a cell in a table?
I have read all the related posts and used them with no success. Obviously I’m not a javascript expert. I had tried with option, and selectedItem, but don’t know how to extract the select object to …
Symfony: Service in other Service not loaded (Too few arguments)
Background I have a OptionHelper-Class that is looking in the database-table, where I store some flexible parameters. This class is working fine in Controllers. Now I want to use this class in a …
Send Image file with Google reCaptcha v2 token to PHP via jQuery + Ajax
I want to POST and upload image via AJAX with Google reCaptcha v2 validation. but I am facing an issue that I am not not able to send image with caption text with google recaptcha token in Ajax. I …
Fatal error: Uncaught Error: Call to a member function X on Y
I am trying to learn OOP PHP so much of this is new to me. I have seen other posts but havent found one that answers my question. class Test { public function a(){ //getting data… return $…
Is it possible to check if cronjob is running in Symfony application?
I am currently working on the project that has over 20 crons. Some of them are pretty long processes. It was built on Symfony 2.8, so we decided to upgrade it to 3.4 LTS. After the upgrade we noticed …
PHP Exception with symfony mailer
I’m a beginner with Symfony, and I have to put a Mailer in my web service. But I have a php exception that I don’t understand. There is my mailer function : private function sendMail(MailerInterface $…
Method not found. error when using Google my business API
I am getting 404 from accouts list function by using google api client. I have already access token by using OAuth2.0. In addition to this, I already enable the Google My Business API via https://console.developers.google.com for OAuth 2.0. ■Here is environemnt PHP 7.2.3 Ubuntu 18.04 LTS google/apiclient ^2.5…