first time poster here, finally decided to make an account here after i used too many hours of my workday trying to solve this problem yesterday. so i have this “sessionCheck.php” script that is supposed to logout the user if he is inactive see code below. Right now the variable $inactive = 15; wh…
Tag: php
IP.Board – Single Sign On in php
I’m developing a small hand made web portal for a community and I want it to have a loggin system with IP.Board (easier for the end user). I have the forum and the app on the same hosting. For the …
How can I create Associative array in Swift 3
Hi I am very new to Swift and am trying to use array. I want to create an array in swift3 similar to this PHP array as below: In the array above the country name are dynamic variables. Answer These are called dictionaries in Swift, and you can create one like this: EDIT: Swift is great at inferring the variab…
The Swift_Transport_MailTransport class is deprecated since version 5.4.5 and will be removed in 6.0. Use the Sendmail or SMTP transport instead
I’m using the SwiftMailer class to send mail using the php mail() function or SMTP depending on my app’s configuration (development or production). My code looks like this : // Default mailer: php …
WordPress: wp-cron not working and not giving error in log
This is a wp-cron I defined in function.php file, but I don’t get any result in the error log, the event is in the cron list but if I launch it nothing happens. I have define(‘WP_DEBUG’, true); And error log enabled on all levels in php.ini Does anybody know where am I doing wrong? SOLUTION …
Tcpdf issue with display hindi language font
I am using Tcpdf PHP library to generate PDF. I got issue with display in Hindi language fonts in generated PDF. I have all things like fonts characters standards etc.. properly but my generated PDF contains ?????? instead of Hindi fonts. please have a look I have included my code here. please help to solve m…
How can I check if a TERM is assigned with a POST using two parameters term slug and post ID?
I need to check whether a post has been assigned with a term but I do not have information about the taxonomy of that term as it could be any taxonomy present in my site. Answer You can have a custom function to return terms for all taxonomies: Then use it like:
How can I format PHP files with HTML markup in Visual Studio Code?
I’m using Laravel so all the views are .blade.php files. Visual Studio Code won’t format the HTML because of the PHP extension. I removed the “blade” part of the filename, but it still isn’t formatting the files properly (via Alt+Shift+F). I also tried about five extensions, but …
How to transfer several rows from one table to other table (SQL)
I have two tables TableA and TableB with colums id, login, pass. Also I have a php array: $array = [1,3,5]. How can I transfer rows from TableA to TableB where id equal each value of my array? id is …