tommt Posted March 2, 2021 Share Posted March 2, 2021 <?php include "C:/php-login/ASEngine/AS.php"; if (! app('login')->isLoggedIn()) { redirect("http://192.168.1.12/php-login/login.php"); } ?> This php code is in a file called test.php and is on my drive Letter O in a sub directory called my old photos . I'm having a problems referencing the include back to the the path of where ASEngine/As.php which is on c drive . I have tried all different relative and absolute paths . Any help would be appreciated Thank You Quote Link to comment https://forums.phpfreaks.com/topic/312235-im-a-new-user-of-php-need-some-basic-help/ Share on other sites More sharing options...
requinix Posted March 2, 2021 Share Posted March 2, 2021 1 hour ago, tommt said: I'm having a problems Can you be more specific about the problems? Any error messages, either from PHP or from your web server, on the screen or in log files? And are you using IIS? Quote Link to comment https://forums.phpfreaks.com/topic/312235-im-a-new-user-of-php-need-some-basic-help/#findComment-1584845 Share on other sites More sharing options...
tommt Posted March 2, 2021 Author Share Posted March 2, 2021 Yes I'm a window server 2019 . If I look look at log files its gives me error 500. It seems that the way i'm trying to enter the full absolute path to where the the files are located on c drive. I have also tried using a system variable for systemdrive which is c drive. quest to access cookie or storage on “<URL>” was blocked because it came from a tracker and content blocking is enabled. 2 Request to access cookie or storage on “https://pagead2.googlesyndication.com/pcs/activeview?xai=AKAOjstegS2966J9HJ3KnS2OhMj8ID_sHWbJSa78l8ech94hdAYAHguHOIQ_oXgToGqHCpKy-vIcx6pbmfPHdsHk72yxm_eJDXx6N6W7onpbj1GROeUuQAPmugG9I1GFmA&sai=AMfl-YQ0z_alpbjfBrbmyLB0FhUKRDwMvSAdGp8OcMWHVgjK6UoWde3fOzBbsaYrCYTIp6PFCnkX2zR5DGMlIWzpNZgVwok02eRbsqM1S0f-cQ40zoYjn6Z9joqs0YLuYjuZ&sig=Cg0ArKJSzG2Cj1vAMwHgEAE&cid=CAASPeRoNSJKrpMu3LPBBFasZ9RAtV6Hq3-n-z8nu4b7W4Ok9NRvCGIxq1jagP5VvBpOv4M0k8-jOVIh4teSFLA&id=ampeos&o=1798,2135&d=300,250&ss=3440,1440&bs=2829,1258&mcvt=52172&mtos=0,0,52172,52172,52172&tos=0,0,52172,0,0&tfs=276&tls=52448&g=60.64000000000001&h=60.64000000000001&pt=&tt=52448&rpt=&rst=1614720421968&r=de&isd=top&msd=top&avms=ampa” was blocked because it came from a tracker and content blocking is enabled. Quote Link to comment https://forums.phpfreaks.com/topic/312235-im-a-new-user-of-php-need-some-basic-help/#findComment-1584846 Share on other sites More sharing options...
requinix Posted March 2, 2021 Share Posted March 2, 2021 1 minute ago, tommt said: Yes I'm a window server 2019 . If I look look at log files its gives me error 500. Does it give information about the 500? And I know you say Windows Server, but are you using IIS specifically? (Probably.) 1 minute ago, tommt said: It seems that the way i'm trying to enter the full absolute path to where the the files are located on c drive. I have also tried using a system variable for systemdrive which is c drive. If you're using IIS, the issue is likely because IIS's user account does not have access to the files. Which is a good thing. Put your PHP code near the same place where your other website files are. Quote Link to comment https://forums.phpfreaks.com/topic/312235-im-a-new-user-of-php-need-some-basic-help/#findComment-1584847 Share on other sites More sharing options...
tommt Posted March 3, 2021 Author Share Posted March 3, 2021 Here are some good news, while on this site I happened to see something that caught my eye, it was a program in PHP that showed different system variables when you ran it , I ran some of the programs and one showed different system variables and one of them was showing the system path where which I should of been using. Change the path my PHP file and Bingo everything works like it should., Thank you for your assistance I'm sure that I'll be asking you more questions in the future. Tom Quote Link to comment https://forums.phpfreaks.com/topic/312235-im-a-new-user-of-php-need-some-basic-help/#findComment-1584855 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.