Results 1 to 5 of 5
-
11-22-2014, 10:54 PM #1Newbie
- Join Date
- Aug 2014
- Posts
- 23
Need help with jQuery... It doesn't $.post or load files from a folder...
I'm runnning a XAMPP localhost on Mac OS X...
The script I have created is to load more content from a MySQL database when the user scrolls to the bottom...
I have a .php page that is supposed to load more content through a jQuery $.post and load request and if I have that file inside htdocs, it works fine... But I'm gonna be creating more of those files and want to put them inside a folder in htdocs... Now it doesn't work...
This works perfectly... I have the load.php file inside htdocs:
$("#div").load("load.php",{"number":variable},function(){variable++;});
Now when I created a folder inside of htdocs "content" and set all file permissions to read & write and placed load.php inside it, it doesn't work:
$("#div").load("content/load.php",{"number":variable},function(){variable++;});
I've also tried:
$("#div").load("http://localhost/content/load.php",{"number":variable},function(){variable++;});
and it also doesn't work
"Inspect Element" in Firefox showed a 500 Internal Server Error for the file...
I restarted my computer and XAMPP and also doesn't work...
Anyone have any idea how I can solve this?
-
11-23-2014, 06:50 PM #2Junior Guru Wannabe
- Join Date
- Feb 2012
- Posts
- 62
Have your tried accessing the file just in your web browser? Does it say internal server error? When moving the file to a new directory if it has any paths in it did you update it to reflect where it is now? Try making a static .html file with some filler text and see if that works.
██ Hosting Boss - Providing you with quality service at a great price!
██ Offering: SSD/Cloud Shared Hosting and Dedicated Servers
██ Its time for up time, sign up today!
-
11-23-2014, 07:33 PM #3Newbie
- Join Date
- Aug 2014
- Posts
- 23
Yup. Just did it. jQuery appended those 3 p tags I have in an html file inside a folder no problem... Then I put the PHP file in the folder and changed the path and it doesn't work... Do .php files only work in htdocs?
Update: I remove everything in the PHP file in the folder and just used <?php echo "Text"; ?> and jQuery also appended that... All I have is a basic script that uses a $_POST variable to retreive data from a database... Then I add in the script piece by piece and echo some text and it displays no problem until I start querying the database... Seems like I can't do any prepared statements querying?Last edited by GreenCat29; 11-23-2014 at 07:44 PM.
-
11-23-2014, 07:45 PM #4Junior Guru Wannabe
- Join Date
- Feb 2012
- Posts
- 62
Does your php file include another file? Is there any variables being sent to the php file? If you can post code that would help.
██ Hosting Boss - Providing you with quality service at a great price!
██ Offering: SSD/Cloud Shared Hosting and Dedicated Servers
██ Its time for up time, sign up today!
-
11-23-2014, 07:51 PM #5Newbie
- Join Date
- Aug 2014
- Posts
- 23
Similar Threads
-
Why Doesn't The jQuery CDN Get A SSL Certificate?
By LittleApps-Nick in forum Programming DiscussionReplies: 8Last Post: 12-09-2012, 02:13 PM -
apache doesn't load index files
By wardpeet in forum Hosting Security and TechnologyReplies: 4Last Post: 08-06-2012, 10:53 AM -
jquery: script doesn't run on ajax loaded page
By jjk2 in forum Programming DiscussionReplies: 4Last Post: 07-07-2009, 02:00 PM -
Website extremely slow to load/doesn't load (numtcpsock)
By gnat0 in forum Hosting Security and TechnologyReplies: 1Last Post: 12-20-2007, 12:37 PM -
how to remove files/folder from temp folder?
By iNCLiP in forum Hosting Software and Control PanelsReplies: 4Last Post: 02-20-2003, 03:26 AM