Forum in maintenance, we will back soon 🙂
problem in placing code
Hey guys am trying to place the php code on the code snippet after the one that mr Hasan had teach use in the video but after i run the am getting some error which i don't understand, please take a look at the image, it indecate the error
 here is the image sir
You need to rename the openai_generate_text function in you new code.
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack
so i can replace it with anything right Example (openai_generate_story)
sir i don't know why am still getting this error undefined after i change the function, i didn't run the php code everywhere i get a short code and i paste the short code inside the page. and for the prompt this is how i set it
@ola12ema there are many ways to debug PHP, here are a couple:
To start debugging in PHP, you can: Open Chrome and navigate to your index.php file. Click the XDebug Helper extension and click the Debug option. Open the script in the editor and press Alt Shift F9. Set a breakpoint at each line where you want the debugger to pause. Switch to the debug view. Click the gear to bring up the languages menu. Select PHP. Reload the PHP server. Press F5 to start the debugger. You can also enable debugging mode in WordPress by accessing your cPanel or hPanel.
Â
---
To set debugging mode in PHP, you can use the following steps:
1. Open your PHP file in a text editor.
2. Look for the line that starts with `<?php`, which indicates the opening of a PHP script.
3. Add the following line of code before any other code:
ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);
The `ini_set()` function is used to change the configuration settings at runtime. In this case, we are setting the `display_errors` and `display_startup_errors` settings to `1` to enable displaying errors, and the `error_reporting` setting to `E_ALL` to report all types of errors.
4. Save the file and run your PHP script again. Now, any errors or warnings will be displayed on the screen, helping you debug your code.
Note: It's important to remember to turn off debugging mode in a production environment to prevent sensitive information from being shown to users.
---
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack
alright sir i'll try to do that
@ola12ema can you please change your display name here, as it is showing your email.
did you manage to get the first tool working?
i've been on the debug for like 5hours now but still not working, any time i channge the function it'll still be giving the same error, i try to debug it from the cpanel, i couldn't mind to pay someone to do this for me 🤦
Â
@ola12ema it is just about the function name. make sure to change the name, and in the last two lines
@admin should i leave the code snippet to run everywhere or i should get a short code and paste it in each page, i'll still try to place the code again, i'll give you feedback about it sir. Thanks for your response
keep it everywhere
Hello,
some thing wrong with your code
I am getting all the time "An error occurred: undefined"
Tried changing function name, same results
Some thing wrong with ajax its getting 400 (Bad Request)
Any ideas??
Â
Best
-
Implementing Youtube-Title-Generator-WP-UI in my AI tools.
9 months ago
-
matrix2.0
1 year ago