これを使うたびに、
$certpath = APP."Plugin".DS."PaypalIpn".DS."Controller".DS."Certificates".DS;
私のコードでは、それは私のcssを台無しにします。まあ、必ずしも台無しではありませんが、私のページは、配置やその他のものにcssを使用していないかのようです。
そのディレクトリ内のファイルを呼び出す必要があるため、そのDSが必要です
$encryption['cert_file'] = $certpath.$encryption['cert_file'];
私はこれを試しました:
$encryption['key_file'] = $certpath.DS.$encryption['key_file'];
$encryption['cert_file'] = $certpath.DS.$encryption['cert_file'];
$encryption['paypal_cert_file'] = $certpath.DS.$encryption['paypal_cert_file'];
まだ運がありません。最初の 2 行はそのように機能しますが、3 行目はそうではありません。
そして、これらのキーワードでグーグルしてみました:
directory separator in cakephp ruins my css
uses of directory separator in cakephp
calling files using directory separator in cakephp
しかし、どれも私を助けませんでした。
DS は単なるディレクトリ セパレータですよね?何が間違っている可能性がありますか?
.........編集部分
これは別の問題です。以前の問題から犯人を見つけましたが、それが私の問題にどのように関連しているかを説明してください。これは私の PaypalHelper.php です
<?php
$importConfig = array(
'type' => 'File',
'name' => 'PaypalIpn.ppcrypto',
//'file' => CONFIGS .'paypal_ipn_config.php'
'file' => APP."Plugin".DS."paypal_ipn".DS."libs".DS."ppcrypto.php"
);
//... other codes
//..other functions
function button($title, $options = array(), $buttonOptions = array()) {
//..other codes
$certpath = APP."Plugin".DS."PaypalIpn".DS."Controller".DS."Certificates".DS;
//..other codes
}
?>
このコードを参照してください。
$importConfig = array(
'type' => 'File',
'name' => 'PaypalIpn.ppcrypto',
//'file' => CONFIGS .'paypal_ipn_config.php'
'file' => APP."Plugin".DS."paypal_ipn".DS."libs".DS."ppcrypto.php"
);
この?
$certpath = APP."Plugin".DS."PaypalIpn".DS."Controller".DS."Certificates".DS;
$encryption['paypal_cert_file'] = $certpath.$encryption['paypal_cert_file'];
$importConfig ..それは間違っていた
$importConfig = array(
'type' => 'File',
'name' => 'PaypalIpn.ppcrypto',
//'file' => CONFIGS .'paypal_ipn_config.php'
'file' => APP."Plugin".DS."PaypalIpn".DS."libs".DS."ppcrypto.php"
);
..しかし、修正しようとすると、 $encryption['paypal_cert_file'] は正常に機能しました。それは私のcssを台無しにしません/(無効にしますか??)
私はこれを最初に答えましたが、頭の中でまだ疑問が生じていると思います..