-7C- Posted June 6, 2013 Share Posted June 6, 2013 Hi, I am a novice to PHP and WAMP but have managed to get the icon green and WAMP services running successfully ( as I understand ). The WAMP page loads fine on localhost. I have made site in local host as C:\wamp\www\main-folder\sub-folder\index.php but when I hit this URL, I get these errors. Basically what I am trying to do is setup this PHP site on my local pas so that I can access its DESIGN view and edit the CSS, HTML and JS of it WITHOUT touching its PHP tagged code at all. Please help. ( ! ) Warning: constant() [<a href='function.constant'>function.constant</a>]: Couldn't find constant PHP_DIR in C:\wamp\www\main-folder\sub-folder\index.php on line 10 Call Stack # Time Memory Function Location 1 0.0005 679968 {main}( ) ..\index.php:0 2 0.0005 680096 constant ( ) ..\index.php:10 ( ! ) Warning: chdir() [<a href='function.chdir'>function.chdir</a>]: Invalid argument (errno 22) in C:\wamp\www\main-folder\sub-folder\index.php on line 10 Call Stack # Time Memory Function Location 1 0.0005 679968 {main}( ) ..\index.php:0 2 0.0008 680320 chdir ( ) ..\index.php:10 Fatal Runtime Error. Thanks Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted June 6, 2013 Share Posted June 6, 2013 did you read the error messages and look at the relevant code and try to figure out why the errors are occurring and if you want us to look at your your code to try and figure out what is causing the errors, wouldn't it be helpful if you posted the relevant code? the first error is because your code is trying to reference a defined constant that doesn't exist. the second error is probably due to the first error. where in your code are you defining the constant PHP_DIR at? Quote Link to comment Share on other sites More sharing options...
trq Posted June 6, 2013 Share Posted June 6, 2013 Without code we can't help. Quote Link to comment Share on other sites More sharing options...
-7C- Posted June 6, 2013 Author Share Posted June 6, 2013 (edited) Hi All, Thanks for your help. I was trying to put in a code link but the post didn't allow me to edit it. Here is the file http://pastebin.com/wvuUY6bn structure is like there are many files in the root folder with index.php , and some folders with other php files where in 1 folder the header.php, and nav.php, and footer.php is stored, are those commands referring these by changing folders ? Edited June 6, 2013 by -7C- Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted June 6, 2013 Share Posted June 6, 2013 (edited) the posted code is part of some larger 3rd party script and isn't meant to be executed directly. it's meant to be included into some other file that sets up up the 'environment' it is meant to run in. Edited June 6, 2013 by mac_gyver Quote Link to comment Share on other sites More sharing options...
-7C- Posted June 6, 2013 Author Share Posted June 6, 2013 Hi mac_gyver , yes its actually a PTC script ( clix script ) from IncentiveScripts,I have already designed the new layout, now wanted to code the layout. Am I doing something wrong ? I have coded a plain HTML for the same, and was about to copy the html/css changes in the php/css of the site. Please advice. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.