Nedyc Posted March 29, 2011 Report Share Posted March 29, 2011 Hi, I followed killerphp's php 6 tutorial (how frameworks work) but I'm having troubles importing css or jquery...classic methods won't work... Andrea. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted March 29, 2011 Report Share Posted March 29, 2011 Hey Andrea. Perhaps you can post the code you are working with? It's hard to help you otherwise. Quote Link to comment Share on other sites More sharing options...
Nedyc Posted March 29, 2011 Author Report Share Posted March 29, 2011 Well, I've studied the php 6 tutorial on killerphp.com so I've an index like this <body> <?PHP include('dbconfig.php'); //AUTOCARICAMENTO CLASSI// define("APPLICATION_PATH",realpath("../")); $paths = array( APPLICATION_PATH, get_include_path() ); set_include_path(implode(PATH_SEPARATOR,$paths)); function __autoload($className){ //Se richiamo una classe e non la trovo $fileName = str_replace("\\","/",$className).'.php'; require_once $fileName; return; } //--AUTOCARICAMENTO CLASSI--// use \com\andorigo as path; $dbConn = new path\models\dbConnection($dbHost,$dbUsername,$dbPassword,$dbName); //CONTROLLERS// $uri = strtolower($_SERVER['REQUEST_URI']); //Se sono offline if(strpos($uri,"/public/")){ $uri = str_replace("/demo/ocarine/","",$uri); } // list($pfx,$controllerName,$actionName) = preg_split("/[\/\\\]/",$uri); switch($controllerName){ case "": case "index": $controllerName = "index"; $controller = new path\controllers\indexController($controllerName,$actionName); break; case "admin": $user = new path\models\user(); $controller = new path\controllers\adminController($controllerName,$actionName); break; } $controller->dispatch(); //--CONTROLLERS--// ?> </body> I also have the 'view' pages and their controllers, but when I try to do a script src or link a css stylesheet it won't work in any page... Quote Link to comment Share on other sites More sharing options...
Nedyc Posted March 29, 2011 Author Report Share Posted March 29, 2011 Solved, I just wrote the path in a wrong way! 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.
Note: Your post will require moderator approval before it will be visible.