Webpage ignores php file

I just added markup to a blank html code page that creates a data chart. This file is titled ‘sensorChart.php’. RW stored this file in: public_html / code folder. This php file requires a file entitled: ‘data.php’. I manually placed the data.php in the ‘code’ folder and the chart still fails to appear.

How do I get the sensorChart.php file to ‘see’ the data.php file?

Here is the website in question.

Thanks!

Since this is not related to any of the Foundry products, or any of the other Elixir tools, I’m moving this to the general Web Development category.

Got it! Thanks for your help.

There are quite a few reasons why the chart may not be appearing. If could be that the sensorChart.php file is not loading the data.php file. It could be there is an error in the code that is interrupting the PHP processing and therefore not generating any output.

Have you looked at the PHP log file on the server? It should list errors that should point you in the correct direction.

Without seeing the actually php files and/or the error messages logged by PHP, it’s very hard to provide much direction.

Thanks for your comments.

What I have learned is that neither Chart.min.js nor jQuery.min.js are recognized in their js folder. This is creating a jquery error in the main php file and not allowing it to load the data.

I’m just about to remake this entire website in good ol’ html and forgo all of these issues.

Thanks.

Don’t give up now! By not recognized, I assume that the browser is not loading them. That seems like it should be pretty easy to track down. The PHP code would not need access to the JS files.

Are those JS files in the “js” folder under the “code” folder? That’s where the browser is looking for them. I’d check and see if the files are there on the server with an FTP app, as my next step.

Man, if I could buy you a pizza and your favorite libation I would do just that.

First of all, I got a great laugh out of your “Don’t give up now!” line. However, the sensorChart.php must have access to the chart js else - no chart. Here are the script calls:

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/Chart.min.js"></script>

No surprise that.

Bottom line: you nailed it by suggesting that the js folder should be under the ‘code’ folder. I did just that and Voila!, the chart popped up. I will be the first to acknowledge that how RW stores/names its files is entirely beyond me. All day long a little voice kept warning me that creating a plain vanilla html page in RW with a chart on it was not going to be a cake walk. Lucky for me, you just happened to drop in and lend a hand.

I cannot thank you enough. Another RW lesson well learned. I will rest well this evening.

I have also just discovered where that mysterious ‘code’ folder name came from … the General Settings pane has a field called ‘Folder’, of all things. I did not name that so this must be a RW default convention to keep the app functioning.

Two RW lessons in one day? Pure gold.

Thanks again for your help