Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » PHP syntax checking with included scripts(How to connect included scripts to main script so that syntax checking is working)
PHP syntax checking with included scripts [message #1797590] Fri, 02 November 2018 11:46 Go to next message
Menno Manheim is currently offline Menno ManheimFriend
Messages: 1
Registered: November 2018
Junior Member
Hello,

I am developing a PHP project and I have a script that includes a second script multiple times. In the second script no declarations are done for my variables since this is already done in the first script.
Now Eclipse is warning me that the used variables in the second script are not declared. And in the first script it warns me that the declared variables are not used.

Is there any way to let Eclipse know the connection between the two scripts? It seems the include statement is not interpreted as such.
Re: PHP syntax checking with included scripts [message #1798023 is a reply to message #1797590] Sat, 10 November 2018 16:32 Go to previous message
Mad Peter is currently offline Mad PeterFriend
Messages: 1
Registered: November 2018
Junior Member
I have the same issue

[SCREENSHOT HERE SHOWING ISSUE BUT CANT POST IT]

Project folder layout


Quote:

index.php
site
vars.php
config.php


inside of "vars" I have a value $A = 0; and $B = 1;
inside of "config" I have echo "".$A."";
inside of index I have just

Quote:

include("site/vars.php");
include("site/config.php")


I am given 2 warnings

Variable '$A' is never used
and
Variable '$A' is undefined
Previous Topic:Debug session starts with internal browser, but not external
Next Topic:v.2.0, working set selecting hides include paths
Goto Forum:
  


Current Time: Fri Apr 19 09:46:12 GMT 2024

Powered by FUDForum. Page generated in 0.02239 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top