I'm having an issue with the path to wp-config.php and wp--db.php - can't access global variables

I’m working on building my own form plugin. I am trying to access the global $wpdb variable but just keep getting this error Warning: require_once(…/…/…/wp-config.php;): failed to open stream: No such file or directory in /app/public/wp-content/plugins/twentyquestions/process-form.php on line 2 I have no idea why I can’t access that variable.

Here is my code.

                global $wpdb, $table_prefix;

                $table_name = $wpdb->prefix . 'form_submission';
                $timestamp = current_time( 'mysql' );
                        'time_stamp' => $timestamp,
                echo "Working";
                echo "Shits Fucked";

Any Help would be amazing. If you need more information let me know thanks!