Initial Commit
This commit is contained in:
30
public/designer/custom-fonts/custom-fonts.php
Normal file
30
public/designer/custom-fonts/custom-fonts.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
header("Content-type: text/css; charset: UTF-8");
|
||||
// database connection
|
||||
$host = "localhost";
|
||||
$username = "root";
|
||||
$password = "";
|
||||
$db = "custom_design";
|
||||
|
||||
// database connection
|
||||
try{
|
||||
|
||||
$conn = new PDO("mysql:host=$host;dbname=$db",$username,$password);
|
||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
}
|
||||
catch(PDOException $pe)
|
||||
{
|
||||
die('Connection error, because: ' .$pe->getMessage());
|
||||
}
|
||||
|
||||
|
||||
$q = $conn->prepare("SELECT cssValues FROM fonts");
|
||||
$q->execute();
|
||||
|
||||
while ($row = $q->fetch()) {
|
||||
echo '@font-face {';
|
||||
echo $row['cssValues'];
|
||||
echo '}';
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user