October 22, 2024
Chicago 12, Melborne City, USA
PHP

so I am trying to route gayahidup.blade.php to berpakaian.blade.php but it gives me an error “Undefined variable $berpakaian”

it gives me an error like this and then if you take a look at my code in controller and web.php Route::get('/gayahidup/{id}',[GayaHidupController::class,'showGayaHidup'])>name('gayahidup.show'); Route::get('gayahidup', [GayaHidupController::class, 'index'])->name('gayahidup.index'); Route::get('gayahidup/create', [GayaHidupController::class, 'create'])->name('gayahidup.create'); Route::post('gayahidup/store', [GayaHidupController::class, 'store'])->name('gayahidup.store'); Route::delete('gayahidup/{id}', [GayaHidupController::class, 'destroy'])->name('gayahidup.destroy'); Route::get('/gayahidup/berpakaian/{id}', [GayaHidupController::class, 'showBerpakaian'])->name('gayahidup.berpakaian.detail'); Route::get('/gayahidup/kecantikan/{id}', [GayaHidupController::class, 'showKecantikan'])->name('gayahidup.kecantikan.detail'); Route::get('/gayahidup/traveling/{id}', [GayaHidupController::class, 'showTraveling'])->name('gayahidup.traveling.detail'); Route::get('/gayahidup/kuliner/{id}', [GayaHidupController::class, 'showKuliner'])->name('gayahidup.kuliner.detail'); Route::get('/gayahidup/berpakaian', [GayaHidupController::class, 'berpakaian'])->name('gayahidup.berpakaian'); and if you look my controller

Read More
PHP

PHP PDO Microsoft Access Driver is returning a 500 error

Attempting to read an access file into a PDO. $db = "D:/VacConJobTrackerbe.accdb"; if (!file_exists($db)) {die("Could Not find database file.");} else {echo "Found Database file.<br/>";} $jobTrackerConn = new PDO("odbc:Dbq=$db;Charset=UTF-8;Driver={Microsoft Access Driver (*.mdb, *.accdb)};Uid=Admin;"); I get a 500 error. The php logs are clean. Other parts of my application successfully read from a sql server. odbc Data

Read More
PHP

Dockerizing PHP (Smarty) and SQLite3 Project

I’m trying to Dockerize my PHP (Smarty) and SQLite3 website but am encountering issues with my Dockerfile and Docker Compose configuration. Here’s a summary of my Dockerfile setup (I’ve trimmed it down to the essential parts): dockerfile Copy code FROM php:8.2.0-apache # Install dependencies RUN apt-get update && apt-get install -y libzip-dev unzip curl sqlite3

Read More
PHP

How to use PHP?

— Create a temporary table to hold the xp_logininfo result CREATE TABLE #LoginInfo ( AccountName NVARCHAR(512), Type NVARCHAR(50), Privilege NVARCHAR(50), MappedLoginName NVARCHAR(512), PermissionPath NVARCHAR(512) ); — Declare variables to store the dynamic SQL and the username (from the larger query) DECLARE @sql NVARCHAR(MAX); DECLARE @username NVARCHAR(512); — Get the username (db owner) from the sys.databases

Read More
PHP

How to Update Textarea Values in Filament Component with JavaScript?

i want to update the value of textarea with java script but when i submit the words i can only get data that users typed directly inside textarea and not changes by javascript what should i do? here is my code: Translate::make() ->locales(['fa', 'en']) ->columnSpanFull() ->columns(2) ->schema(fn (string $locale) => [ Forms\Components\Select::make('variables') ->extraAttributes([ 'onchange' =>

Read More
PHP

php ftp fail to keep source file after download into local

Can someone elaborate how this function ftp_get() work? I use this function in code, but file keep missing in source directory either download success or fail. How this function send the file into local? What method did it use? Copy and paste method or cut and paste? You need to sign in to view this

Read More
PHP

Compare two meta key values with between value

Records in CPT are as follow Name Size From Size To Demo 1 900 6000 Demo 2 5000 6000 Demo 3 7500 12000 Demo 4 2500 7500 Demo 5 9000 12000 $meta_query = array( 'relation' => 'OR', array( array( 'key' => '_size', 'value' => array(1000, 5000), 'type' => 'decimal(10, 2)', 'compare' => 'between' ), array(

Read More
PHP

AWS PHP SDK issue with credentials after upgrading to v3

I have an issue on getting credentials after upgrading from 2nd version to 3rd. My service gets credentials from metadata server and cache them in file. Here is how service definition looks like on 2nd version: my_app.infrastructure.s3.client.credentials_cache.adapter: class: Doctrine\Common\Cache\FilesystemCache public: false arguments: - '%kernel.cache_dir%/aws_credentials' my_app.infrastructure.s3.client.credentials_cache: class: Guzzle\Cache\DoctrineCacheAdapter public: false arguments: - '@my_app.infrastructure.s3.client.credentials_cache.adapter' my_app.infrastructure.s3.client: class: Aws\S3\S3Client

Read More
PHP

How to make an expert system with Forward chaining and Dempster shafer as method?

I already made an expert system with only Dempster Shafer as the method, but i want to make Forward Chaining as the inference method for my system. What i am doing to add the Forward Chaining to my system?? Plz bring me the steps or the main code in PHP for my system You need

Read More
PHP

How to render non-latin characters in chrome-php on Almalinux system when browser is running in headless mode?

Non-Latin characters are showing as boxes or not showing at all when text in rendered in headless chromium running via Chrome-Php on AlmaLinux OS as seen below: The characters show as intended when the webpage is opened in Chrome on Windows/Android/iOS. How to resolve this issue? You need to sign in to view this answers

Read More