I have imported database table from the localhost to the public host (live server).
On the live server database(backend), Arabic text is appearing properly but when I search data on webpage (php), Arabic text appearing like ????? this. anyhow, with entering new data working fine.
Any help will be highly appreciated
Related
I am new in Codeigniter 4, and I am working on a tutorial related to Emojis.
I got the problem that I spent a week on the internet with the hope to find out a solution. Unfortunately, nothing can solve the issue. Hope you can help me out.
Issue description:
I followed the link from Github emojionearea that assisted me with creating an Emoji picker.
It run perfectly until I submitted an emoji to database and retrieved it from DB to show in a webpage.
I selected an emoji, for example the Man Technologist emoji, it was showed in the input field as One Emoji (see the screenshot "Before submitting" below), which is what I want.
Before Submitting
After I submitted it to the database and retrieved to display in a page, I realised that there are two emojis have been saved (see "After Submitting" screenshot below).
After Submitting
That is the issue I want to be helped.
Following is my Database Settings:
I set DB, DB tables and columns to the charset utf8mb4 and collations to utf8mb4_unicode_ci.
I run SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%'; in phpmyadmin SQL to see the current status of my Database with the Charset set. It shows as below:
DB Charset
In the file Database.php in Config folder, I set as below:
enter image description here
In my php view, I included the code <meta http-equiv="Content-type" content="text/html" charset="utf-8"> in the header.
Done descripting my issue.
Please help me go throught and fix this problem.
Thank you!
I tried to change to many charsets for database.
I was expecting that Database got exactly as the emoji displayed in a page before being submitted to Database.
It says on the Emojionearea github page that "The end result is a secure text/plain in which the image icons will be replaced with their Unicode analogues." So what is saving to the database is the unicode version of the Emojione image you picked.
To convert the unicode back to an Emojione image, install the PHP Toolkit for the Emojione library:
https://github.com/joypixels/emoji-toolkit/blob/master/INSTALLATION.md
composer require joypixels/emoji-toolkit
Then use this toolkit to convert the unicode back to an image:
https://github.com/joypixels/emoji-toolkit/blob/master/examples/PHP.md
use JoyPixels\Client;
use JoyPixels\Ruleset;
$client = new Client(new Ruleset());
echo $client->toImage($inputText);
Emojionearea seems to be using an older version (3.1.2) of Emojione by default, so you might want to create an extension of the Client class to set the toolkit to the same version, as the images for the various versions are slightly different:
<?php
namespace App\Libraries;
use JoyPixels\Client;
class Emoji extends Client
{
public $emojiVersion = '3.1'; // 3.1.2 does not seem to work
}
Then use this class instead to convert the unicode string into an image:
use App\Libraries\Emoji;
use JoyPixels\Ruleset;
$client = new Emoji(new Ruleset());
echo $client->toImage($inputText);
I have a local WordPress site running on MySQL. I wanted to move it to a server for testing and deployment. In addition to migrating new/changed code and media files, I exported the database from my local machine to a .sql file using Sequel Pro on Mac. Then I changed all URLs in the export to match the URL of the server. Then I imported it to the server database.
Everything's fine. No errors. Except the menus I created on my local machine are not showing up on the server. I'm seeing recommendations for plugins to export menus and import them on the server. But that seems silly to me. Aren't menus defined in the database? Isn't everything defined there in terms of content, options, settings, etc.? Why would I need to export/import menus and nothing else?
When you export and import the database of the wordpress site, the menus also include in it.
You just need to check in your admin panel the menu will be there. You just need to assign that menu for appropriate menu location like primary or which you have created, like this screenshot https://prnt.sc/1wp2gvd
The answer was that I was using a Pantheon.io-based upload/import feature to upload and import my .sql file. When I instead used Sequel Pro on MacOS to export my local database, connect to and import it to Pantheon.io, everything came through.
I am very new to programing but after a lot of research i can rufly manage to create a dropdown selection from database and show a column result from that table based on the dropdown selection using ajax.
I write the html form, the php file that connects to the database, the script that loads the data on the dropdown list, the script that handles the on change event and calls for the php file that queries the database and display the result on a div.
In this particular case is a price stored on the database based on the destination selection.
Now my problem atarts here:
I'm using joomla and i would like to do this with the code that I have but I have no clue where to save the various html, php and js files.
I tried doing this with chronoforms but gave up as I found it very difficult.
Can someone give me some advise on what and how to do this?
I am creating a desktop windows form application with database attached.. the first screen consists of a form that user is supposed to fill, if he/she wants to print this form.. is there any solution that a file in pdf form be created dynamically, that user can print?
Besides the record is also saved in database.
I have used iTextSharp it works well for web applications. But i want to generate a file from windows form app.
Kindly help
Thanks in advance
Use any reporting services like sap crystal reports or Birth , then in desktop application populates the data changes through store procedures.
Create report which use this same store procedure.
Once the report is called from desktop app, from the report you have options to export pdf, excel etc.
I'm trying to pull Chinese database content to some dynamic PHP pages within our CodeIgniter website. The PHP files that make up each page are encoded as UTF-8 which displays static Chinese text correctly. However, all Chinese content from the database is rendered as question marks.
For example 中华人民共和国 in the database shows up as ???????.
As with the PHP code, all tables are collated as utf8_unicode_ci. The data shows correctly in the database. Any ideas? Many thanks!
This is now sorted. Line 50 of database.php in root -> application -> config should have read:
Correct:
$db['default']['char_set'] = "utf8"
Incorrect:
$db['default']['char_set'] = "UTF-8"
Something so simple! I hope that might help others.