Page 1 of 1

not able to access files inside folders in my php code

Posted: Thu Mar 10, 2016 5:11 am
by yogesh0811
i have one blank.html file in <C:\wamp\www\Admin\pages\examples\blank.html> and i want to access api.php file in blank.html file which is in <C:\wamp\www\Admin\services\api.php> so how can i able to access api.php file in blank.html file. i want to see effects of api.php file code in blank.html file please suggest solution. thank you

Re: not able to access files inside folders in my php code

Posted: Thu Mar 10, 2016 5:39 am
by requinix
Rename blank.html to blank.php and put some PHP code inside it to include() api.php.

Re: not able to access files inside folders in my php code

Posted: Thu Mar 10, 2016 5:49 am
by yogesh0811
what type of php code i have to insert??

Re: not able to access files inside folders in my php code

Posted: Thu Mar 10, 2016 7:17 am
by Celauran
As requinix suggested, start with include.

Code: Select all

<?php include 'api.php';