include files #43
-
|
I found the root of a |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
|
The root of the project is automatically added to the include paths ;) <?php
require_once('vendor/autoload.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
</body>
</html>You can find a more complex example in the starter repo: https://github.com/nititech/php-vite-starter |
Beta Was this translation helpful? Give feedback.
-
|
Ah I see. I got this error:
|
Beta Was this translation helpful? Give feedback.
-
|
As I am developing an api and vue app hosted in the same folder (CORS) I had to split debugging PHP and the Vue app with two distinct .vite.config.js files. I'm doing a to debug the vue app (and assuming the PHP api is working), or a when doing a api PHP debug session. main distinction being in being absent or not. This way I can set the XDEBUG cookie. I do a |
Beta Was this translation helpful? Give feedback.
The root of the project is automatically added to the include paths ;)
So in theory all you need to do in your
/index.phpis:You can find a more complex example in the starter repo: https://github.com/nititech/php-vite-starter