Webpage Ignores Required php File

I created an ‘html code’ webpage - sensorChart.php - to plot out a data chart. The webpage requires another file - data.php - to retrieve the chart data from a database. RW has placed the chart webpage in a folder entitled ‘code’. I manually placed data.php in the same ‘code’ folder and I still cannot get the chart to appear on the webpage.

I created a test chart on another ‘html code’ webpage and it worked as it should. This chart relies on internal static data so it does not require and external php file to load its data. In this case, I was simply verifying that a chart could be plotted on the ‘html code’ RW webpage.

How can I get the webpage to ‘see’ the separate data.php file?

Here is the website in question.

Thanks!

Without knowing where the code is looking for the file it’s impossible to help you.

PHP unlike HTML, CSS, and JavaScript is a server-side language, so the general public (like us) can’t see it in developer tools.

Thanks for your comments.

First of all, the chart webpage - sensorChart.php - requires both jQuery.js and Chart.js to function. These, naturally, belong in a js folder. I manually placed this folder within the public_html folder of this project. The chart still refused to appear and errors were screaming that both abovementioned js files were missing. What?

Fastforwarding: with some great help I learned that the js folder had to be in the same folder that the sensorChart.php file was in. Good to know, but 'sensorChart.php was nowhere to be found in the public_html folder. I will be the very first to admit that I know absolutely nada about how RW names/stores its files. So, it took some digging, but I finally learned that RW renamed this file ‘index.php’ and stored it in a folder entitled ‘code’. (I will keep my thoughts to myself about this discovery …) Once I understood this and placed the js folder within the ‘code’ folder, Voila!, the chart appeared. Hallelujah!!

Lessons Learned
First of all, I accidentally discovered what the Folder box in the General Settings pane is all about because - Surprise! - the Folder pane was filled with the word ‘code’. Hmmm-mmm, where have I seen that name before? That was Lesson One.

Lesson Two was already alluded to above: all pertinent files need to be in their proper folder. Got it! Now.

It should be obvious that I am not a full-time RWer, but I never fail to learn from its world-wide community which gives so freely of its time and expertise.

Chicago is stepping a bit more smartly this AM.

Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.